UNPKG

@wcardinal/wcardinal-geditor

Version:

WebGL-based graphic editor, tester and viewer for supervisory systems

33 lines 1.06 kB
import { __extends } from "tslib"; import { Graphics, Point } from "pixi.js"; var FILL_COLOR = 0x1e87f0; var FILL_ALPHA = 0.5; var EToolSelectArea = /** @class */ (function (_super) { __extends(EToolSelectArea, _super); function EToolSelectArea() { var _this = _super.call(this) || this; _this._size = new Point(); return _this; } Object.defineProperty(EToolSelectArea.prototype, "size", { get: function () { return this._size; }, enumerable: false, configurable: true }); EToolSelectArea.prototype.update = function () { this.clear(); var size = this._size; var x = Math.min(0, size.x); var y = Math.min(0, size.y); var width = Math.abs(size.x); var height = Math.abs(size.y); this.beginFill(FILL_COLOR, FILL_ALPHA); this.drawRect(x, y, width, height); this.endFill(); }; return EToolSelectArea; }(Graphics)); export { EToolSelectArea }; //# sourceMappingURL=e-tool-select-area.js.map