|
@@ -33,7 +33,14 @@ import {
|
|
|
} from "@persagy-web/graph";
|
|
|
import { SItemStatus, ItemOrder } from "..";
|
|
|
import { SMouseEvent } from "@persagy-web/base";
|
|
|
-import { SSize, SRect, SPainter, SColor, SFont, SPoint } from "@persagy-web/draw";
|
|
|
+import {
|
|
|
+ SSize,
|
|
|
+ SRect,
|
|
|
+ SPainter,
|
|
|
+ SColor,
|
|
|
+ SFont,
|
|
|
+ SPoint
|
|
|
+} from "@persagy-web/draw";
|
|
|
import { Anchor } from "../types/topology/Anchor";
|
|
|
|
|
|
|
|
@@ -155,7 +162,10 @@ export class SIconTextItem extends SObjectItem {
|
|
|
}
|
|
|
set sWidth(v: number) {
|
|
|
this.img.width = v;
|
|
|
- this.img.origin = new SPoint(this.img.width * 0.5, this.img.height * 0.5);
|
|
|
+ this.img.origin = new SPoint(
|
|
|
+ this.img.width * 0.5,
|
|
|
+ this.img.height * 0.5
|
|
|
+ );
|
|
|
this.changeAnchorPoint();
|
|
|
this.update();
|
|
|
}
|
|
@@ -166,7 +176,10 @@ export class SIconTextItem extends SObjectItem {
|
|
|
}
|
|
|
set sHeight(v: number) {
|
|
|
this.img.height = v;
|
|
|
- this.img.origin = new SPoint(this.img.width * 0.5, this.img.height * 0.5);
|
|
|
+ this.img.origin = new SPoint(
|
|
|
+ this.img.width * 0.5,
|
|
|
+ this.img.height * 0.5
|
|
|
+ );
|
|
|
this.changeAnchorPoint();
|
|
|
this.update();
|
|
|
}
|
|
@@ -222,7 +235,10 @@ export class SIconTextItem extends SObjectItem {
|
|
|
super(parent);
|
|
|
this.img.width = 32;
|
|
|
this.img.height = 32;
|
|
|
- this.img.origin = new SPoint(this.img.width * 0.5, this.img.height * 0.5);
|
|
|
+ this.img.origin = new SPoint(
|
|
|
+ this.img.width * 0.5,
|
|
|
+ this.img.height * 0.5
|
|
|
+ );
|
|
|
this.img.connect("onMove", this, this.changeAnchorPoint.bind(this));
|
|
|
let anchorPoint;
|
|
|
if (data && data.length) {
|
|
@@ -372,9 +388,17 @@ export class SIconTextItem extends SObjectItem {
|
|
|
painter.shadow.shadowColor = this.activeColor;
|
|
|
painter.shadow.shadowOffsetX = 5;
|
|
|
painter.shadow.shadowOffsetY = 5;
|
|
|
- painter.drawCircle(this.img.x, this.img.y, (this.sWidth / 2.0 + 3) * 1.25);
|
|
|
+ painter.drawCircle(
|
|
|
+ this.img.x,
|
|
|
+ this.img.y,
|
|
|
+ (this.sWidth / 2.0 + 3) * 1.25
|
|
|
+ );
|
|
|
} else {
|
|
|
- painter.drawCircle(this.img.x, this.img.y, this.sWidth / 2.0 + 3);
|
|
|
+ painter.drawCircle(
|
|
|
+ this.img.x,
|
|
|
+ this.img.y,
|
|
|
+ this.sWidth / 2.0 + 3
|
|
|
+ );
|
|
|
}
|
|
|
} else {
|
|
|
if (this.selected) {
|