|
@@ -113,7 +113,6 @@ export class ImageCropperCtrl extends ModuleControl<EditorModule> {
|
|
|
|
|
|
this.controls.historyCtrl.state.enable = false;
|
|
|
|
|
|
-
|
|
|
const obj = new CompObject(imgComp);
|
|
|
const w = obj.width, h = obj.height; //图片的宽高
|
|
|
const r1 = h / w;
|
|
@@ -132,7 +131,7 @@ export class ImageCropperCtrl extends ModuleControl<EditorModule> {
|
|
|
this.modifyCtrl.baseBox.h = cardBox.height;
|
|
|
this.modifyCtrl.state.toolbarNames = ["Right", "Cross"];
|
|
|
|
|
|
- const defaultScale = imgComp.value.s == undefined || imgComp.value.s == 1 && imgComp.value.x == 0 && imgComp.value.y;
|
|
|
+ const defaultScale = imgComp.value.s == undefined || (imgComp.value.s == 1 && imgComp.value.x == 0 && imgComp.value.y == 0);
|
|
|
let scale = 1;
|
|
|
let offsetX = 0;
|
|
|
let offsetY = 0;
|
|
@@ -183,7 +182,8 @@ export class ImageCropperCtrl extends ModuleControl<EditorModule> {
|
|
|
this.initValue.h = srcHeight;
|
|
|
|
|
|
//获取obj的image图片的世界大小
|
|
|
- const objC = new ObjsContainer([obj]) //当前对象作为容器
|
|
|
+ const paths = this.helper.getCompTrees(id);
|
|
|
+ const objC = new ObjsContainer([new CompObject(paths[2])]) //当前对象作为容器
|
|
|
m.prepend(objC.parent.worldTransform);
|
|
|
|
|
|
if (this.controls.selectCtrl.assistMagnet) {
|