Bläddra i källkod

Increased file overlay slice to 4096 for larger screen support

n1474335 7 år sedan
förälder
incheckning
f6b68f9880
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 3 3
      src/web/InputWaiter.js
  2. 1 1
      src/web/OutputWaiter.js

+ 3 - 3
src/web/InputWaiter.js

@@ -275,13 +275,13 @@ InputWaiter.prototype.handleLoaderMessage = function(e) {
  */
 InputWaiter.prototype.displayFilePreview = function() {
     const inputText = document.getElementById("input-text"),
-        fileSlice = this.fileBuffer.slice(0, 2048);
+        fileSlice = this.fileBuffer.slice(0, 4096);
 
     inputText.style.overflow = "hidden";
     inputText.classList.add("blur");
     inputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));
-    if (this.fileBuffer.byteLength > 2048) {
-        inputText.value += "[truncated]";
+    if (this.fileBuffer.byteLength > 4096) {
+        inputText.value += "[truncated]...";
     }
 };
 

+ 1 - 1
src/web/OutputWaiter.js

@@ -131,7 +131,7 @@ OutputWaiter.prototype.setFile = function(buf) {
 
     // Display preview slice in the background
     const outputText = document.getElementById("output-text"),
-        fileSlice = this.dishBuffer.slice(0, 2048);
+        fileSlice = this.dishBuffer.slice(0, 4096);
 
     outputText.classList.add("blur");
     outputText.value = Utils.printable(Utils.arrayBufferToStr(fileSlice));