diff --git a/src/js/controller/piskel/PiskelController.js b/src/js/controller/piskel/PiskelController.js index ed3d7320..1f8e407f 100644 --- a/src/js/controller/piskel/PiskelController.js +++ b/src/js/controller/piskel/PiskelController.js @@ -205,6 +205,13 @@ } }; + ns.PiskelController.prototype.setLayerOpacityAt = function (index, opacity) { + var layer = this.getLayerByIndex(index); + if (layer) { + layer.setOpacity(opacity); + } + }; + ns.PiskelController.prototype.mergeDownLayerAt = function (index) { var layer = this.getLayerByIndex(index); var downLayer = this.getLayerByIndex(index - 1); diff --git a/src/js/controller/piskel/PublicPiskelController.js b/src/js/controller/piskel/PublicPiskelController.js index 033d578a..e8d82b9b 100644 --- a/src/js/controller/piskel/PublicPiskelController.js +++ b/src/js/controller/piskel/PublicPiskelController.js @@ -29,6 +29,7 @@ this.saveWrap_('moveLayerUp', true); this.saveWrap_('moveLayerDown', true); this.saveWrap_('removeCurrentLayer', true); + this.saveWrap_('setLayerOpacityAt', true); var shortcuts = pskl.service.keyboard.Shortcuts; pskl.app.shortcutService.registerShortcut(shortcuts.MISC.PREVIOUS_FRAME, this.selectPreviousFrame.bind(this));