Deselect before saving

Fixes #14
main
Isaiah Odhner 2018-01-18 02:37:47 -05:00
parent 7bb78af987
commit 7e6cc52f44
2 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,6 @@
### Issues
* [Selection is not included in the image when you save (it should deselect)](https://github.com/1j01/jspaint/issues/14)
* ["Quick Undo" stopped working in Chrome](https://github.com/1j01/jspaint/issues/9)
* [Resizing the canvas or selection is broken when magnified](https://github.com/1j01/jspaint/issues/13)
* If you open an image it resets the zoom but if you're on the magnification tool it doesn't update the options

View File

@ -232,6 +232,7 @@ function file_load_from_url(){
}
function file_save(){
deselect();
if(file_name.match(/\.svg$/)){
file_name = file_name.replace(/\.svg$/, "") + ".png";
//TODO: update_title();?
@ -245,6 +246,7 @@ function file_save(){
}
function file_save_as(){
deselect();
if(window.chrome && chrome.fileSystem && chrome.fileSystem.chooseEntry){
chrome.fileSystem.chooseEntry({
type: 'saveFile',