Fixed issue with multipaths
This commit is contained in:
parent
041d7ecfdf
commit
5575e9f103
@ -92,12 +92,5 @@ function Keyboard()
|
||||
Object.keys(ronin.modules).forEach(function (key){
|
||||
ronin.modules[key].key_escape();
|
||||
});
|
||||
|
||||
// Clear managed layers
|
||||
Object.keys(ronin.surface.layers).forEach(function (key) {
|
||||
if(ronin.surface.layers[key].manager){
|
||||
ronin.surface.layers[key].clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -24,15 +24,18 @@ function Cursor(rune)
|
||||
|
||||
this.active = function(cmd)
|
||||
{
|
||||
console.log("!");
|
||||
if(cmd.bang()){
|
||||
console.log("??");
|
||||
this.magnetism = null;
|
||||
if(this.layer){ this.layer.remove(this); }
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.layer){ this.create_layer(); }
|
||||
|
||||
this.layer.clear();
|
||||
|
||||
if(cmd.bang()){
|
||||
this.magnetism = null;
|
||||
this.layer.remove(this);
|
||||
}
|
||||
|
||||
if(cmd.position()){
|
||||
this.grid = cmd.position();
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ function Layer(name,manager = null)
|
||||
|
||||
this.remove = function(manager)
|
||||
{
|
||||
console.log("Removing layer "+this.name);
|
||||
manager.layer = null;
|
||||
ronin.surface.layers[this.name].element.outerHTML = "";
|
||||
delete ronin.surface.layers[this.name];
|
||||
|
@ -27,7 +27,7 @@ function Vector(rune)
|
||||
this.paths.push(this.create_path());
|
||||
this.coordinates = [];
|
||||
|
||||
this.layer.remove(this);
|
||||
if(this.layer){ this.layer.remove(this); }
|
||||
|
||||
ronin.surface.active_layer.context().lineCap = cmd.variable("line_cap") ? cmd.variable("line_cap").value : "square";
|
||||
ronin.surface.active_layer.context().lineWidth = cmd.variable("stroke_width") ? cmd.variable("stroke_width").value : 10;
|
||||
|
Loading…
x
Reference in New Issue
Block a user