Creating init method for localstorage

This commit is contained in:
Vince 2012-08-29 23:32:51 +02:00
parent 6cc8534041
commit c227687df8

View File

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