diff --git a/js/piskel.js b/js/piskel.js index cb30bbb8..3600c233 100644 --- a/js/piskel.js +++ b/js/piskel.js @@ -58,7 +58,10 @@ this.initPreviewSlideshow(); this.initAnimationPreview(); this.initColorPicker(); + this.initLocalStorageBackup(); + }, + initLocalStorageBackup: function() { if(window.localStorage && window.localStorage['snapShot']) { var message = document.createElement('div'); message.id = "user-message"; @@ -167,6 +170,15 @@ this.createPreviews(); }, + initPreviewSlideshow: function() { + var addFrameButton = $('add-frame-button'); + addFrameButton.addEventListener('mousedown', function() { + frameSheet.addEmptyFrame(); + piskel.setActiveFrameAndRedraw(frameSheet.getFrameCount() - 1); + }); + this.createPreviews(); + }, + initAnimationPreview : function() { var scope = this;