|
@@ -1,6 +1,6 @@
|
|
|
|
|
|
import { SGraphItem, SImageItem } from "@saga-web/graph/lib";
|
|
import { SGraphItem, SImageItem } from "@saga-web/graph/lib";
|
|
-import { SPainter } from "@saga-web/draw";
|
|
|
|
|
|
+import { SPainter, SColor } from "@saga-web/draw";
|
|
import { Marker } from '../types/Marker';
|
|
import { Marker } from '../types/Marker';
|
|
import { ItemOrder } from '@saga-web/big/lib';
|
|
import { ItemOrder } from '@saga-web/big/lib';
|
|
|
|
|
|
@@ -23,6 +23,7 @@ export class SImageMarkerItem extends SImageItem {
|
|
super(parent);
|
|
super(parent);
|
|
this.zOrder = ItemOrder.imageOrder;
|
|
this.zOrder = ItemOrder.imageOrder;
|
|
this.isTransform = false;
|
|
this.isTransform = false;
|
|
|
|
+ this.url = "";
|
|
this.data = data;
|
|
this.data = data;
|
|
this.id = data.ID;
|
|
this.id = data.ID;
|
|
this.name = data.Name;
|
|
this.name = data.Name;
|
|
@@ -34,12 +35,20 @@ export class SImageMarkerItem extends SImageItem {
|
|
if (data.Properties && data.Properties.Url) {
|
|
if (data.Properties && data.Properties.Url) {
|
|
this.url = data.Properties.Url;
|
|
this.url = data.Properties.Url;
|
|
}
|
|
}
|
|
|
|
+ if (data.Properties.LineWidth) {
|
|
|
|
+ this.lineWidth = data.Properties.LineWidth;
|
|
|
|
+ }
|
|
|
|
+ if (data.Properties.StrokeColor) {
|
|
|
|
+ this.strokeColor = data.Properties.StrokeColor.includes('#') ? new SColor(data.Properties.StrokeColor) : new SColor(hexify(data.Properties.StrokeColor));
|
|
|
|
+ }
|
|
} // Constructor
|
|
} // Constructor
|
|
|
|
|
|
toData(): Marker {
|
|
toData(): Marker {
|
|
this.data.Pos = {X: this.x, Y: this.y};
|
|
this.data.Pos = {X: this.x, Y: this.y};
|
|
this.data.Size = {Width: this.width, Height: this.height};
|
|
this.data.Size = {Width: this.width, Height: this.height};
|
|
this.data.Properties.Url = this.url;
|
|
this.data.Properties.Url = this.url;
|
|
|
|
+ this.data.Properties.StrokeColor = this.strokeColor.value;
|
|
|
|
+ this.data.Properties.LineWidth = this.lineWidth;
|
|
return this.data;
|
|
return this.data;
|
|
}
|
|
}
|
|
} // Class SImageMarkerItem
|
|
} // Class SImageMarkerItem
|