"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SRectSelectItem = void 0; const lib_1 = require("@persagy-web/graph/lib"); const lib_2 = require("@persagy-web/draw/lib"); const __1 = require(".."); class SRectSelectItem extends lib_1.SGraphItem { constructor(parent, point) { super(parent); this.startPoint = new lib_2.SPoint(); this.endPoint = new lib_2.SPoint(); this.startPoint = point; this.endPoint = new lib_2.SPoint(point.x, point.y); this.update(); this.zOrder = __1.ItemOrder.rectSelectOrder; } boundingRect() { return new lib_2.SRect(this.startPoint, this.endPoint); } onMouseMove(event) { this.endPoint.x = event.x; this.endPoint.y = event.y; this.update(); return true; } onDraw(painter) { painter.pen.lineWidth = painter.toPx(2); painter.pen.color = __1.ItemColor.rectSelectOutColor; painter.brush.color = __1.ItemColor.rectSelectInColor; painter.drawRect(this.startPoint, this.endPoint); } } exports.SRectSelectItem = SRectSelectItem;