Issue #414: part3: PiskelController api + history support

This commit is contained in:
Julian Descottes 2016-03-06 00:15:53 +01:00 committed by juliandescottes
parent 6546b520b3
commit a75e78e366
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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));