assets/js/*: substitute VT w/ SP.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-11-24 08:52:28 +01:00
parent baacc19a67
commit 2e682e0af1
5 changed files with 23 additions and 24 deletions

View File

@ -66,12 +66,11 @@ var clipboard = (function () {
}, },
import_colorcode: function (data, no_undo) { import_colorcode: function (data, no_undo) {
if (data && data.preventDefault) { if (data && data.preventDefault) {
data = import_textarea.value data = import_textarea.value
} } else {
else { data = data || import_textarea.value
data = data || import_textarea.value }
}
var irssi_style_regex = /^\s*\/exec -out printf ("%b" )?"/; var irssi_style_regex = /^\s*\/exec -out printf ("%b" )?"/;

View File

@ -100,7 +100,7 @@ var blit = (function(){
}) })
} }
blit.square = function(A, lex){ blit.square = function(A, lex){
// i.e. no transparency // i.e. no transparency
} }
return blit return blit
})() })()

View File

@ -216,13 +216,13 @@ Matrix.prototype.resize = function(w,h){
} }
} }
Matrix.prototype.resize_rapper = function(){ Matrix.prototype.resize_rapper = function(){
var cell = canvas.aa[0][0].span var cell = canvas.aa[0][0].span
var cw = cell.offsetWidth var cw = cell.offsetWidth
var ch = cell.offsetHeight var ch = cell.offsetHeight
// if (canvas.grid) { ch++ } // if (canvas.grid) { ch++ }
var width = cw * this.aa[0].length var width = cw * this.aa[0].length
var height = ch * this.aa.length var height = ch * this.aa.length
if (canvas.grid) { width++; height++ } if (canvas.grid) { width++; height++ }
if (this.rotated) { if (this.rotated) {
this.rapper.parentNode.classList.add("rotated") this.rapper.parentNode.classList.add("rotated")
this.rapper.parentNode.style.height = (width) + "px" this.rapper.parentNode.style.height = (width) + "px"

View File

@ -119,12 +119,12 @@ var controls = (function(){
controls.grid = new BlurredCheckbox (grid_el) controls.grid = new BlurredCheckbox (grid_el)
controls.grid.memorable = true controls.grid.memorable = true
controls.grid.use = function(state){ 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') document.body.classList[ state ? "add" : "remove" ]('grid')
letters.grid = palette.grid = canvas.grid = state letters.grid = palette.grid = canvas.grid = state
canvas.resize_rapper() canvas.resize_rapper()
palette.resize_rapper() palette.resize_rapper()
letters.resize_rapper() letters.resize_rapper()
if (! selection.hidden) selection.reposition() if (! selection.hidden) selection.reposition()
this.update( state ) this.update( state )
} }

View File

@ -167,11 +167,11 @@ d=this.apply(a,arguments))===e?a:d}.bind(d):d;a.init&&a.init.apply(a,arguments)
=Model); // c-{{{-< =Model); // c-{{{-<
function defaults (dest, src) { function defaults (dest, src) {
dest = dest || {} dest = dest || {}
for (var i in src) { for (var i in src) {
dest[i] = typeof dest[i] == 'undefined' ? src[i] : dest[i] dest[i] = typeof dest[i] == 'undefined' ? src[i] : dest[i]
} }
return dest return dest
} }
function setSelectionRange(input, selectionStart, selectionEnd) { function setSelectionRange(input, selectionStart, selectionEnd) {