mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Creating init method for localstorage
This commit is contained in:
parent
6cc8534041
commit
c227687df8
12
js/piskel.js
12
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user