|
@@ -101,6 +101,9 @@ export class SImageLegendItem extends SIconTextItem {
|
|
|
if (data.Properties.ImgPos) {
|
|
|
this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
|
|
|
}
|
|
|
+ if (data.Properties && data.Properties.ImgRotate) {
|
|
|
+ this.img.rotate = data.Properties.ImgRotate;
|
|
|
+ }
|
|
|
if (data.Properties && data.Properties.font) {
|
|
|
this.font = new SFont("sans-serif", data.Properties.font);
|
|
|
}
|
|
@@ -124,6 +127,18 @@ export class SImageLegendItem extends SIconTextItem {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 鼠标按下事件
|
|
|
+ *
|
|
|
+ * @param event 保存事件参数
|
|
|
+ * @return boolean
|
|
|
+ */
|
|
|
+ onMouseDown(event: SMouseEvent): boolean {
|
|
|
+ if (event.buttons == 1)
|
|
|
+ this.$emit("legendItemClick", event);
|
|
|
+ return super.onMouseDown(event);
|
|
|
+ } // Function onMouseDown()
|
|
|
+
|
|
|
toData(): Legend {
|
|
|
this.data.Pos = { X: this.x, Y: this.y };
|
|
|
this.data.Size = { Width: this.width, Height: this.height };
|
|
@@ -132,6 +147,7 @@ export class SImageLegendItem extends SIconTextItem {
|
|
|
this.data.Properties.Url = this.img.url;
|
|
|
this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
|
|
|
this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
|
|
|
+ this.data.Properties.ImgRotate = this.img.rotate;
|
|
|
this.data.Properties.Size = {
|
|
|
Width: this.sWidth,
|
|
|
Height: this.sHeight
|