Increased file overlay slice to 4096 for larger screen support

feature-extract-files
n1474335 2018-02-12 13:57:01 +00:00
parent f6b2783f8b
commit f6b68f9880
2 changed files with 4 additions and 4 deletions

View File

@ -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]...";
}
};

View File

@ -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));