From 2e682e0af1332f4653927ea8cb8600a390ce6647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sat, 24 Nov 2018 08:52:28 +0100 Subject: [PATCH] assets/js/*: substitute VT w/ SP. --- assets/js/clipboard.js | 11 +++++------ assets/js/gfx.js | 2 +- assets/js/matrix.js | 14 +++++++------- assets/js/ui/controls.js | 10 +++++----- assets/js/util.js | 10 +++++----- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/assets/js/clipboard.js b/assets/js/clipboard.js index 270214c..6ede8f3 100644 --- a/assets/js/clipboard.js +++ b/assets/js/clipboard.js @@ -66,12 +66,11 @@ var clipboard = (function () { }, import_colorcode: function (data, no_undo) { - if (data && data.preventDefault) { - data = import_textarea.value - } - else { - data = data || import_textarea.value - } + if (data && data.preventDefault) { + data = import_textarea.value + } else { + data = data || import_textarea.value + } var irssi_style_regex = /^\s*\/exec -out printf ("%b" )?"/; diff --git a/assets/js/gfx.js b/assets/js/gfx.js index ccfd28c..a9d2f66 100644 --- a/assets/js/gfx.js +++ b/assets/js/gfx.js @@ -100,7 +100,7 @@ var blit = (function(){ }) } blit.square = function(A, lex){ - // i.e. no transparency + // i.e. no transparency } return blit })() diff --git a/assets/js/matrix.js b/assets/js/matrix.js index 5fc404a..032cecd 100644 --- a/assets/js/matrix.js +++ b/assets/js/matrix.js @@ -216,13 +216,13 @@ Matrix.prototype.resize = function(w,h){ } } Matrix.prototype.resize_rapper = function(){ - var cell = canvas.aa[0][0].span - var cw = cell.offsetWidth - var ch = cell.offsetHeight -// if (canvas.grid) { ch++ } - var width = cw * this.aa[0].length - var height = ch * this.aa.length - if (canvas.grid) { width++; height++ } + var cell = canvas.aa[0][0].span + var cw = cell.offsetWidth + var ch = cell.offsetHeight +// if (canvas.grid) { ch++ } + var width = cw * this.aa[0].length + var height = ch * this.aa.length + if (canvas.grid) { width++; height++ } if (this.rotated) { this.rapper.parentNode.classList.add("rotated") this.rapper.parentNode.style.height = (width) + "px" diff --git a/assets/js/ui/controls.js b/assets/js/ui/controls.js index e749851..fcfeb11 100644 --- a/assets/js/ui/controls.js +++ b/assets/js/ui/controls.js @@ -119,12 +119,12 @@ var controls = (function(){ controls.grid = new BlurredCheckbox (grid_el) controls.grid.memorable = true controls.grid.use = function(state){ - state = typeof state == "boolean" ? state : ! document.body.classList.contains("grid") + state = typeof state == "boolean" ? state : ! document.body.classList.contains("grid") document.body.classList[ state ? "add" : "remove" ]('grid') - letters.grid = palette.grid = canvas.grid = state - canvas.resize_rapper() - palette.resize_rapper() - letters.resize_rapper() + letters.grid = palette.grid = canvas.grid = state + canvas.resize_rapper() + palette.resize_rapper() + letters.resize_rapper() if (! selection.hidden) selection.reposition() this.update( state ) } diff --git a/assets/js/util.js b/assets/js/util.js index 5c13ed2..c71cae5 100644 --- a/assets/js/util.js +++ b/assets/js/util.js @@ -167,11 +167,11 @@ d=this.apply(a,arguments))===e?a:d}.bind(d):d;a.init&&a.init.apply(a,arguments) =Model); // c-{{{-< function defaults (dest, src) { - dest = dest || {} - for (var i in src) { - dest[i] = typeof dest[i] == 'undefined' ? src[i] : dest[i] - } - return dest + dest = dest || {} + for (var i in src) { + dest[i] = typeof dest[i] == 'undefined' ? src[i] : dest[i] + } + return dest } function setSelectionRange(input, selectionStart, selectionEnd) {