mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Disable drawing of any type when locked
This commit is contained in:
parent
aff1f7ccb6
commit
d55024d503
@ -25,6 +25,11 @@
|
||||
* @param {Number} y : y coordinate of the mouse event that initiated the drag
|
||||
*/
|
||||
ns.DragHandler.prototype.startDrag = function (x, y) {
|
||||
var index = this.piskelController.getCurrentLayerIndex();
|
||||
var layer = this.piskelController.getLayerByIndex(index);
|
||||
if (layer.locked) {
|
||||
return;
|
||||
}
|
||||
var coords = this.drawingController.getSpriteCoordinates(x, y);
|
||||
this.updateOrigin_(coords.x, coords.y);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user