12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- "use strict";
- 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 __());
- };
- })();
- Object.defineProperty(exports, "__esModule", { value: true });
- var SvgHelper_1 = require("../../renderer/SvgHelper");
- var RectangularMarker_1 = require("../RectangularMarker");
- var RectBaseMarker = (function (_super) {
- __extends(RectBaseMarker, _super);
- function RectBaseMarker() {
- return _super !== null && _super.apply(this, arguments) || this;
- }
- RectBaseMarker.prototype.applySnap = function (snap) {
- _super.prototype.applySnap.call(this, snap);
- if (snap.rectSnap) {
- this.markerRect.setAttribute('width', this.width.toString());
- this.markerRect.setAttribute('height', this.height.toString());
- }
- };
- RectBaseMarker.prototype.init = function () {
- _super.prototype.init.call(this);
- this.markerRect = SvgHelper_1.SvgHelper.createRect(this.width, this.height);
- this.addToRenderVisual(this.markerRect);
- };
- RectBaseMarker.prototype.resize = function (x, y, onPosition) {
- _super.prototype.resize.call(this, x, y, onPosition);
- this.markerRect.setAttribute('width', this.width.toString());
- this.markerRect.setAttribute('height', this.height.toString());
- };
- RectBaseMarker.createMarker = function (page) {
- var marker = new RectBaseMarker();
- marker.page = page;
- marker.init();
- return marker;
- };
- return RectBaseMarker;
- }(RectangularMarker_1.RectangularMarker));
- exports.RectBaseMarker = RectBaseMarker;
|