var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import { SGraphyItem } from '@sybotan-web/graphy';
import { SRect } from "@sybotan-web/draw";
/**
 * 位置标签item
 *
 * @author 郝建龙
 */
var MarkerItem = /** @class */ (function (_super) {
    __extends(MarkerItem, _super);
    /**
     * 构造函数
     *
     * @param data
     */
    function MarkerItem(parent, id, name) {
        var _this = _super.call(this, parent) || this;
        /** 旗子宽度 */
        _this.width = 5000;
        /** 旗子高度 */
        _this.height = 5000;
        _this.id = id;
        _this.name = name;
        _this.img = new Image();
        _this.img.src = MarkerItem.imgSource;
        return _this;
    }
    /**
     * Item对象边界区域
     *
     * @return	SRect
     */
    MarkerItem.prototype.boundingRect = function () {
        return new SRect(0, 0, this.width, this.height);
    }; // Function boundingRect()
    /**
     * 鼠标单击事件
     *
     * @param	event         事件参数
     * @return	boolean
     */
    MarkerItem.prototype.onClick = function (event) {
        this.$emit('click', event);
        return true;
    }; // Function onClick()
    /**
     * Item绘制操作
     *
     * @param   painter       painter对象
     * @param   rect          绘制区域
     */
    MarkerItem.prototype.onDraw = function (painter, rect) {
        painter.drawImage(this.img, 0, 0, this.width, this.height);
    }; // Function onDraw()
    /** 旗子路径 */
    MarkerItem.imgSource = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6c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