Trying to fix issues with layer.move
This commit is contained in:
parent
1c6a8b3c9b
commit
e4be214c1f
@ -74,9 +74,11 @@ function Layer(name,host = "user")
|
|||||||
var offset_x = this.move_from.x - position.x;
|
var offset_x = this.move_from.x - position.x;
|
||||||
var offset_y = this.move_from.y - position.y;
|
var offset_y = this.move_from.y - position.y;
|
||||||
|
|
||||||
|
var content = this.context().canvas;
|
||||||
|
|
||||||
this.context().globalCompositeOperation = "copy";
|
this.context().globalCompositeOperation = "copy";
|
||||||
this.context().drawImage(this.context().canvas, -offset_x, -offset_y);
|
|
||||||
this.context().globalCompositeOperation = "source-over";
|
this.context().globalCompositeOperation = "source-over";
|
||||||
|
this.context().drawImage(content,-offset_x,-offset_y,ronin.surface.size.width,ronin.surface.size.height);
|
||||||
|
|
||||||
this.move_from = new Position(position.x,position.y);
|
this.move_from = new Position(position.x,position.y);
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ function Typographe(rune)
|
|||||||
var ctx = context;
|
var ctx = context;
|
||||||
|
|
||||||
var text = cmd.variable("text").value;
|
var text = cmd.variable("text").value;
|
||||||
var position = cmd.position() ? cmd.position() : new Position(10,10);
|
var position = cmd.position() ? cmd.position() : new Position(20,40);
|
||||||
var color = cmd.color() ? cmd.color() : new Color("#000000");
|
var color = cmd.color() ? cmd.color() : new Color("#000000");
|
||||||
var size = cmd.value() ? cmd.value().int : 20;
|
var size = cmd.value() ? cmd.value().int : 20;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user