"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SBoardItem = void 0; const lib_1 = require("@persagy-web/draw/lib"); const __1 = require("../.."); const lib_2 = require("@persagy-web/graph/lib"); class SBoardItem extends lib_2.SGraphItem { constructor(parent, data) { super(parent); this.pointArr = []; this.pathList = []; this.data = data; this.zOrder = 0; if (this.data.OutLine.length && this.data.OutLine[0] && this.data.OutLine[0].length) { let tempArr = this.data.OutLine; this.pointArr = tempArr.map((t) => { let sPath = new lib_1.SPath2D(); let tempArr = t.map((it) => { let array = it.map((item) => { let x = item.X, y = -item.Y; return new lib_1.SPoint(x, y); }); sPath.polygon(array); return array; }); this.pathList.push(sPath); return tempArr; }); } } contains(x, y) { return false; } onDraw(painter) { painter.pen.lineWidth = painter.toPx(1); painter.brush.color = __1.ItemColor.spaceColor; painter.pen.color = __1.ItemColor.spaceBorderColor; this.pathList.forEach((t) => { painter.drawPath(t); }); } } exports.SBoardItem = SBoardItem;