Fix post merge bugs for desktop mode
This commit is contained in:
parent
4b7b18ca6f
commit
3d6cd3e576
2 changed files with 4 additions and 12 deletions
|
@ -29,18 +29,14 @@
|
|||
this.isPublicCheckbox.setAttribute('checked', true);
|
||||
}
|
||||
|
||||
//Environment dependent configuration:
|
||||
if (pskl.utils.Environment.detectNodeWebkit()) {
|
||||
// running in Node-Webkit...
|
||||
this.addEventListener('#save-file-button', 'click', this.saveFileDesktop);
|
||||
// hide the "save in browser" part of the gui
|
||||
// hide "save in browser"
|
||||
var saveInBrowserSection = document.querySelector('#save-in-browser');
|
||||
saveInBrowserSection.style.display = 'none';
|
||||
} else {
|
||||
// running in browser...
|
||||
this.addEventListener('#save-file-button', 'click', this.saveFileBrowser_);
|
||||
}
|
||||
|
||||
this.addEventListener('#save-file-button', 'click', this.saveFile_);
|
||||
|
||||
this.addEventListener('#save-browser-button', 'click', this.saveLocal_);
|
||||
|
||||
this.saveOnlineButton = document.querySelector('#save-online-button');
|
||||
|
@ -142,10 +138,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated - renamed "saveFileBrowser_"
|
||||
* @private
|
||||
*/
|
||||
ns.SaveController.prototype.saveFile_ = function () {
|
||||
// detect if this is running in NodeWebkit
|
||||
if (pskl.utils.Environment.detectNodeWebkit()) {
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
// TODO: if there is already a file path, use it for the dialog's
|
||||
// working directory and filename
|
||||
pskl.utils.FileUtilsDesktop.saveAs(serialized, null, 'piskel', function (selectedSavePath) {
|
||||
this.onSaveSuccess_();
|
||||
this.piskelController.setSavePath(selectedSavePath);
|
||||
this.onSaveSuccess_();
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue