|
@@ -197,10 +197,14 @@ export class SIconTextItem extends SObjectItem {
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
anchorPoint = [
|
|
anchorPoint = [
|
|
- { x: this.img.x, y: this.img.y + this.img.height / 2, id: "" },
|
|
|
|
- { x: this.img.x, y: this.img.y - this.img.height / 2, id: "" },
|
|
|
|
- { x: this.img.x - this.img.width / 2, y: this.img.y, id: "" },
|
|
|
|
- { x: this.img.x + this.img.width / 2, y: this.img.y, id: "" }
|
|
|
|
|
|
+ { x: this.img.x, y: this.img.y, id: "" },
|
|
|
|
+ { x: this.img.x, y: this.img.y, id: "" },
|
|
|
|
+ { x: this.img.x, y: this.img.y, id: "" },
|
|
|
|
+ { x: this.img.x, y: this.img.y, id: "" }
|
|
|
|
+ // { x: this.img.x, y: this.img.y + this.img.height / 2, id: "" },
|
|
|
|
+ // { x: this.img.x, y: this.img.y - this.img.height / 2, id: "" },
|
|
|
|
+ // { x: this.img.x - this.img.width / 2, y: this.img.y, id: "" },
|
|
|
|
+ // { x: this.img.x + this.img.width / 2, y: this.img.y, id: "" }
|
|
];
|
|
];
|
|
}
|
|
}
|
|
this.anchorList = anchorPoint.map(t => {
|
|
this.anchorList = anchorPoint.map(t => {
|
|
@@ -228,10 +232,14 @@ export class SIconTextItem extends SObjectItem {
|
|
// 判断是否有锚点
|
|
// 判断是否有锚点
|
|
if (this.anchorList.length) {
|
|
if (this.anchorList.length) {
|
|
let anchorPoint = [
|
|
let anchorPoint = [
|
|
- { x: this.img.x, y: this.img.y + this.img.height / 2 },
|
|
|
|
- { x: this.img.x, y: this.img.y - this.img.height / 2 },
|
|
|
|
- { x: this.img.x - this.img.width / 2, y: this.img.y },
|
|
|
|
- { x: this.img.x + this.img.width / 2, y: this.img.y }
|
|
|
|
|
|
+ { x: this.img.x, y: this.img.y },
|
|
|
|
+ { x: this.img.x, y: this.img.y },
|
|
|
|
+ { x: this.img.x, y: this.img.y },
|
|
|
|
+ { x: this.img.x, y: this.img.y }
|
|
|
|
+ // { x: this.img.x, y: this.img.y + this.img.height / 2 },
|
|
|
|
+ // { x: this.img.x, y: this.img.y - this.img.height / 2 },
|
|
|
|
+ // { x: this.img.x - this.img.width / 2, y: this.img.y },
|
|
|
|
+ // { x: this.img.x + this.img.width / 2, y: this.img.y }
|
|
];
|
|
];
|
|
this.anchorList.forEach((item, index) => {
|
|
this.anchorList.forEach((item, index) => {
|
|
item.moveTo(anchorPoint[index].x, anchorPoint[index].y);
|
|
item.moveTo(anchorPoint[index].x, anchorPoint[index].y);
|