diff --git a/.gitignore b/.gitignore index b5cb4535..5b90b268 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ build/ /src/main/generated/ /LOG_PATH_IS_UNDEFINED/ .DS_Store + +**/props/local/globals.properties diff --git a/src/main/webapp/resources/3rd-party/paintweb/paintweb.js b/src/main/webapp/resources/3rd-party/paintweb/paintweb.js index ee2bae9f..5be4126b 100644 --- a/src/main/webapp/resources/3rd-party/paintweb/paintweb.js +++ b/src/main/webapp/resources/3rd-party/paintweb/paintweb.js @@ -2558,6 +2558,15 @@ function PaintWeb (win, doc) { * @returns {Boolean} True if the operation was successful, or false if not. */ this.imageSave = async function (type) { + //-------------------------------------------------------------------- + // 변경된 부분 : 변경된 내용이 없으면 skip + //-------------------------------------------------------------------- + if(!pw.image.modified){ + alert('변경된 내용이 없습니다.'); + return false; + } + //-------------------------------------------------------------------- + var canvas = _self.layer.canvas, cfg = _self.config, img = _self.image, @@ -2619,7 +2628,6 @@ function PaintWeb (win, doc) { canvas = null; // alert('idata~~~'+idata) if (!idata || idata === 'data:,') { -//alert('idata~~~'+idata) return false; } @@ -2635,9 +2643,12 @@ function PaintWeb (win, doc) { let fileType = 'image/'; const regx = new RegExp('.(gif|jpg|jpeg|tiff|png|ico)$', 'i') let name = (/[^(/|\\)]*$/).exec(idata)[0] - // 20220915_5df30439017240afbc7081ae9bfbfa2f 와 같은 형태인 경우 imageName으로 + // 20220915_5df30439017240afbc7081ae9bfbfa2f_e 와 같은 형태인 경우 imageName으로 + // 원본파일명 + '_e' if(!regx.exec(name)){ - name = srcImg.name; + const imgName = srcImg.name; + const idx = imgName.indexOf('.'); + name = imgName.substring(0, idx)+'_e'+ imgName.substring(idx); } fileType += regx.test(name) ? regx.exec(name)[0].replace('.', '') : 'jpg' // mine type 'jpg' > jpeg로 변경