@@ -12729,7 +12729,7 @@ ImgOps | https://imgops.com/#b#`;
1272912729 }
1273012730
1273112731 const blobUrlMap = new Map();
12732- if (!envir.firefox) {
12732+ try {
1273312733 const drawImageProxy = new Proxy(unsafeWindow.CanvasRenderingContext2D.prototype.drawImage, {
1273412734 apply: function (target, thisArg, argumentsList) {
1273512735 let image = argumentsList[0];
@@ -12751,7 +12751,7 @@ ImgOps | https://imgops.com/#b#`;
1275112751 }
1275212752 });
1275312753 unsafeWindow.URL.createObjectURL = createObjectURLProxy;
12754- }
12754+ } catch(e) {}
1275512755
1275612756 function downloadImg(url, name, type, errCb) {
1275712757 urlToBlob(url, (blob, ext) => {
@@ -23531,13 +23531,13 @@ ImgOps | https://imgops.com/#b#`;
2353123531 if (paPosi.width > 30 && paPosi.height > 30) {
2353223532 const style = unsafeWindow.getComputedStyle(this.data.img);
2353323533 const matrix = new DOMMatrixReadOnly(style.transform);
23534- let translateX = matrix.m41, translateY = matrix.m42;
23535- if (translateY || this.data.img.offsetTop != 0) {
23534+ let translateX = matrix.m41, translateY = matrix.m42, scaleX = matrix.m11, scaleY = matrix.m22 ;
23535+ if (translateY || this.data.img.offsetTop != 0 || (scaleY && scaleY !== 1) ) {
2353623536 if (paPosi.height < targetPosi.height - 3) {
2353723537 targetPosi.top = paPosi.top;
2353823538 }
2353923539 }
23540- if (translateX || this.data.img.offsetLeft != 0) {
23540+ if (translateX || this.data.img.offsetLeft != 0 || (scaleX && scaleX !== 1) ) {
2354123541 if (paPosi.width < targetPosi.width - 3) {
2354223542 targetPosi.left = paPosi.left;
2354323543 }
0 commit comments