12345678910111213141516171819202122232425262728293031323334353637 |
- import { SImageItem } from "@saga-web/graph/lib";
- import { ItemOrder } from '@saga-web/big/lib';
- /**
- * 标识对象Item(图标类型)
- *
- * * @author 张宇(taohuzy@163.com)
- */
- export class SImageMarkerItem extends SImageItem {
- /**
- * 构造函数
- *
- * @param parent 指向父对象
- * @param data 标识对象数据
- */
- constructor(parent, data) {
- super(parent);
- this.zOrder = ItemOrder.imageOrder;
- this.isTransform = false;
- this.data = data;
- this.id = data.ID;
- this.name = data.Name;
- this.moveTo(data.Pos.X, data.Pos.Y);
- if (data.Size) {
- this.width = data.Size.Width;
- this.height = data.Size.Height;
- }
- if (data.Properties && data.Properties.Url) {
- this.url = data.Properties.Url;
- }
- } // Constructor
- toData() {
- this.data.Pos = { X: this.x, Y: this.y };
- this.data.Size = { Width: this.width, Height: this.height };
- this.data.Properties.Url = this.url;
- return this.data;
- }
- } // Class SImageMarkerItem
|