ding-image-editor 3.15.6 → 3.15.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tui-image-editor.css +1 -1
- package/dist/tui-image-editor.js +46 -9
- package/dist/tui-image-editor.min.css +1 -1
- package/dist/tui-image-editor.min.js +2 -2
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/js/component/shape.js +0 -1
- package/src/js/component/text.js +3 -1
- package/src/js/component/zoom.js +22 -3
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/src/js/component/text.js
CHANGED
@@ -488,7 +488,7 @@ class Text extends Component {
|
|
488
488
|
* @private
|
489
489
|
*/
|
490
490
|
_onFabricSelect(fEvent) {
|
491
|
-
console.log('
|
491
|
+
console.log('sssssssddddddds')
|
492
492
|
this.isPrevEditing = true;
|
493
493
|
|
494
494
|
this.setSelectedInfo(fEvent.target, true);
|
@@ -525,6 +525,8 @@ class Text extends Component {
|
|
525
525
|
const e = fEvent.e || {};
|
526
526
|
const originPointer = this.getCanvas().getPointer(e);
|
527
527
|
|
528
|
+
console.log('_fireAddText')
|
529
|
+
|
528
530
|
if (!obj) {
|
529
531
|
this.fire(events.ADD_TEXT, {
|
530
532
|
originPosition: {
|
package/src/js/component/zoom.js
CHANGED
@@ -576,15 +576,34 @@ class Zoom extends Component {
|
|
576
576
|
|
577
577
|
const halfWidth = Math.floor(bounding.width/2);
|
578
578
|
const left = Math.floor(Math.abs(bounding.left))
|
579
|
-
|
579
|
+
// 左移动
|
580
|
+
if(bounding.left<0 && deltaX>0 && Math.abs(deltaX) > Math.abs(deltaY) ){
|
580
581
|
this._movePointOfZoom({ x: deltaX, y: 0 });
|
581
582
|
}
|
582
|
-
|
583
|
+
else if( bounding.left>0 && deltaX>0 && Math.abs(deltaX) > Math.abs(deltaY) ){
|
584
|
+
this._movePointOfZoom({ x: -bounding.left, y: 0 });
|
585
|
+
}
|
583
586
|
|
587
|
+
// 右移动
|
588
|
+
if(left< halfWidth && deltaX <0 && Math.abs(deltaX) > Math.abs(deltaY) ){
|
589
|
+
this._movePointOfZoom({ x: deltaX, y: 0 });
|
590
|
+
}else if(left >halfWidth && deltaX <0 && Math.abs(deltaX) > Math.abs(deltaY) ){
|
591
|
+
this._movePointOfZoom({ x: left-halfWidth, y: 0 });
|
592
|
+
}
|
593
|
+
|
594
|
+
// 上移动
|
584
595
|
const halfHeight = Math.floor(bounding.height/2);
|
585
596
|
const top = Math.floor(Math.abs(bounding.top))
|
586
|
-
if(
|
597
|
+
if(bounding.top<0 && deltaY>0 && Math.abs(deltaX) < Math.abs(deltaY) ){
|
598
|
+
this._movePointOfZoom({ x: 0, y: deltaY });
|
599
|
+
}else if(bounding.top>0 && deltaY>0 && Math.abs(deltaX) < Math.abs(deltaY)){
|
600
|
+
this._movePointOfZoom({ x: 0, y: -bounding.top });
|
601
|
+
}
|
602
|
+
// 下移动
|
603
|
+
if(top<halfHeight && deltaY<0 && Math.abs(deltaX) < Math.abs(deltaY)){
|
587
604
|
this._movePointOfZoom({ x: 0, y: deltaY });
|
605
|
+
}else if(top>halfHeight && deltaY<0 && Math.abs(deltaX) < Math.abs(deltaY)){
|
606
|
+
this._movePointOfZoom({ x: 0, y: top-halfHeight });
|
588
607
|
}
|
589
608
|
}
|
590
609
|
|