diff --git a/src/js/controller/drawing/DragHandler.js b/src/js/controller/drawing/DragHandler.js index f3b134d7..7f9a90ec 100644 --- a/src/js/controller/drawing/DragHandler.js +++ b/src/js/controller/drawing/DragHandler.js @@ -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); };