|
@@ -5,6 +5,7 @@ import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
|
|
|
import { STextItem } from '@saga-web/graph/lib';
|
|
|
import { hexify, uuid } from "@/components/mapClass/until"
|
|
|
import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
|
|
|
+import { SMouseEvent } from '@saga-web/base/lib';
|
|
|
/**
|
|
|
* 图例节点Item(区域类型)
|
|
|
*
|
|
@@ -93,9 +94,11 @@ export class SCustomLegendItem extends SPolygonItem {
|
|
|
}
|
|
|
this._showText = v;
|
|
|
if (v) {
|
|
|
- this.textItem.show();
|
|
|
+ this.cursor = "pointer";
|
|
|
+ this.textItem.cursor = "pointer";
|
|
|
} else {
|
|
|
- this.textItem.hide();
|
|
|
+ this.cursor = "auto";
|
|
|
+ this.textItem.cursor = "auto";
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -199,6 +202,18 @@ export class SCustomLegendItem extends SPolygonItem {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 鼠标按下事件
|
|
|
+ *
|
|
|
+ * @param event 保存事件参数
|
|
|
+ * @return boolean
|
|
|
+ */
|
|
|
+ onMouseDown(event: SMouseEvent): boolean {
|
|
|
+ if (event.buttons == 1)
|
|
|
+ this.$emit("legendItemClick", event);
|
|
|
+ return super.onMouseDown(event);
|
|
|
+ } // Function onMouseDown()
|
|
|
+
|
|
|
toData(): any {
|
|
|
this.data.Pos = { X: this.x, Y: this.y };
|
|
|
this.data.Name = this.name;
|