mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fixing remove and duplicate actions from previewfilm
This commit is contained in:
parent
6e8142bb3a
commit
2cda69b000
@ -178,6 +178,7 @@
|
||||
|
||||
canvasPreviewDuplicateAction.addEventListener('click', function(evt) {
|
||||
framesheet.duplicateFrameByIndex(tileNumber);
|
||||
$.publish(Events.LOCALSTORAGE_REQUEST); // Should come from model
|
||||
$.publish('SET_ACTIVE_FRAME', [tileNumber + 1]);
|
||||
});
|
||||
|
||||
@ -197,7 +198,9 @@
|
||||
canvasPreviewDeleteAction.className = "tile-action"
|
||||
canvasPreviewDeleteAction.innerHTML = "del"
|
||||
canvasPreviewDeleteAction.addEventListener('click', function(evt) {
|
||||
piskel.removeFrame(tileNumber);
|
||||
framesheet.removeFrameByIndex(tileNumber);
|
||||
$.publish(Events.FRAMESHEET_RESET);
|
||||
$.publish(Events.LOCALSTORAGE_REQUEST); // Should come from model
|
||||
});
|
||||
previewTileRoot.appendChild(canvasPreviewDeleteAction);
|
||||
}
|
||||
|
@ -80,6 +80,10 @@ $.namespace("pskl");
|
||||
$.subscribe('SET_ACTIVE_FRAME', function(evt, frameId) {
|
||||
piskel.setActiveFrameAndRedraw(frameId);
|
||||
});
|
||||
|
||||
$.subscribe('FRAMESHEET_RESET', function(evt, frameId) {
|
||||
piskel.redraw();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user