Skip to content
Snippets Groups Projects
Commit 4e5c7f30 authored by mcmlxxix's avatar mcmlxxix
Browse files

insert empty array at specified location instead of initializing characters to frame width

parent 2b395ce2
No related branches found
No related tags found
No related merge requests found
...@@ -775,18 +775,12 @@ function Frame(x,y,width,height,attr,parent) { ...@@ -775,18 +775,12 @@ function Frame(x,y,width,height,attr,parent) {
this.refresh(); this.refresh();
} }
this.insertLine = function(y) { this.insertLine = function(y) {
var l = undefined; if(properties.data[y])
if(properties.data[y]) { properties.data.splice(y,0,[]);
var l = new Array(this.width); else
properties.data.splice(y,0,l);
for(var x=0;x<this.width;x++) {
properties.data[y][x] = new Char();
}
this.refresh();
} else {
properties.data[y] = []; properties.data[y] = [];
} this.refresh();
return l; return properties.data[y];
} }
this.deleteLine = function(y) { this.deleteLine = function(y) {
var l = undefined; var l = undefined;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment