From c804e64febbec95a6de917283a20999fdf634144 Mon Sep 17 00:00:00 2001 From: leon Date: Tue, 5 Jul 2022 15:13:31 +0800 Subject: [PATCH] roojs-core.js roojs-core-debug.js roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- roojs-all.js | 4 ++-- roojs-debug.js | 14 +++++++++++--- roojs-ui-debug.js | 14 +++++++++++--- roojs-ui.js | 4 ++-- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 20fb250051..fe99d4d405 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -2897,8 +2897,8 @@ this.setCanvasPosition();}},onFooterButtonClick:function(e,el,o,A){switch(A){cas break;case 'download':this.download(e);break;default:break;}this.fireEvent('footerbuttonclick',this,A);},beforeSelectFile:function(e){e.preventDefault();if(this.fireEvent('beforeselectfile',this)!=false){this.selectorEl.dom.click();}},onFileSelected:function(e){e.preventDefault(); if(typeof(this.selectorEl.dom.files)=='undefined'||!this.selectorEl.dom.files.length){console.log("EMPTY RETURN");return;}var A=this.selectorEl.dom.files[0];if(this.fireEvent('inspect',this,A)!=false){this.prepare(A);}},trash:function(e){this.fireEvent('trash',this); },download:function(e){this.fireEvent('download',this);},loadCanvas:function(A){if(this.fireEvent('beforeloadcanvas',this,A)!=false){this.reset();this.imageEl=document.createElement('img');var B=this;this.imageEl.addEventListener("load",function(){B.onLoadCanvas(); -});this.imageEl.src=A;}},onLoadCanvas:function(){this.imageEl.OriginWidth=this.imageEl.naturalWidth||this.imageEl.width;this.imageEl.OriginHeight=this.imageEl.naturalHeight||this.imageEl.height;var A=this;if(this.imageEl.OriginWidth