@@ -15056,6 +15056,8 @@ ImgOps | https://imgops.com/#b#`;
1505615056
1505715057 var moveFiredCount=0;
1505815058 var moveHandler=function(e){
15059+ e.preventDefault();
15060+ e.stopPropagation();
1505915061 moveFiredCount++;
1506015062 if(moveFiredCount<2){//给个缓冲。。
1506115063 return;
@@ -21715,6 +21717,8 @@ ImgOps | https://imgops.com/#b#`;
2171521717 imgWStyle.top=oriOffset.top + (e.pageY || e.touches[0].pageY)-mouseCoor.y +'px';
2171621718 self.keepScreenInside();
2171721719 self.moving=true;
21720+ e.preventDefault();
21721+ e.stopPropagation();
2171821722 };
2171921723 var mouseupHandler=function(){
2172021724 e.preventDefault();
@@ -23490,14 +23494,17 @@ ImgOps | https://imgops.com/#b#`;
2349023494 var targetPosi = getContentClientRect(this.data.img);
2349123495 var pa = this.data.img.parentNode;
2349223496 if (pa && pa.scrollHeight > 30 && pa.scrollWidth > 30) {
23493- var paPosi=getContentClientRect(pa );
23497+ var paPosi=pa.getBoundingClientRect( );
2349423498 if (paPosi.width > 30 && paPosi.height > 30) {
23495- if (this.data.img.offsetTop != 0) {
23499+ const style = unsafeWindow.getComputedStyle(this.data.img);
23500+ const matrix = new DOMMatrixReadOnly(style.transform);
23501+ let translateX = matrix.m41, translateY = matrix.m42;
23502+ if (translateY || this.data.img.offsetTop != 0) {
2349623503 if (paPosi.height < targetPosi.height - 3) {
2349723504 targetPosi.top = paPosi.top;
2349823505 }
2349923506 }
23500- if (this.data.img.offsetLeft != 0) {
23507+ if (translateX || this.data.img.offsetLeft != 0) {
2350123508 if (paPosi.width < targetPosi.width - 3) {
2350223509 targetPosi.left = paPosi.left;
2350323510 }
0 commit comments