Skip to content

Commit

Permalink
Merge pull request #7 from viliusle/gh-pages
Browse files Browse the repository at this point in the history
import data fix
  • Loading branch information
viliusle committed Sep 5, 2013
2 parents 43f95bd + b0508a6 commit a6bcfb5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function LAYER_CLASS(){
DRAW.redraw_preview();
};
this.layer_remove = function(i){
if(LAYERS[i].primary == 1) return false;
element = document.getElementById(LAYERS[i].name);
element.getContext("2d").clearRect(0, 0, WIDTH, HEIGHT);
element.parentNode.removeChild(element);
Expand Down
4 changes: 4 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ function MAIN_CLASS(){
w = $(xml).find("width").text();
h = $(xml).find("height").text();

//delete old layers
for(var i in LAYERS)
LAYER.layer_remove(i);

//init new file
ZOOM = 100;
MAIN.init();
Expand Down
1 change: 1 addition & 0 deletions mods/demo/js/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ function LAYER_CLASS(){
DRAW.redraw_preview();
};
this.layer_remove = function(i){
if(LAYERS[i].primary == 1) return false;
element = document.getElementById(LAYERS[i].name);
element.getContext("2d").clearRect(0, 0, WIDTH, HEIGHT);
element.parentNode.removeChild(element);
Expand Down
4 changes: 4 additions & 0 deletions mods/demo/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ function MAIN_CLASS(){
w = $(xml).find("width").text();
h = $(xml).find("height").text();

//delete old layers
for(var i in LAYERS)
LAYER.layer_remove(i);

//init new file
ZOOM = 100;
MAIN.init();
Expand Down

0 comments on commit a6bcfb5

Please sign in to comment.