1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.SLineMarkerItem = void 0;
- const SPolylineItem_1 = require("../SPolylineItem");
- class SLineMarkerItem extends SPolylineItem_1.SPolylineItem {
- constructor(parent, data) {
- super(parent, []);
- this._scaleX = 1;
- this._scaleY = 1;
- this._rolate = 0;
- this.data = data;
- this.moveTo(data.Pos.X, data.Pos.Y);
- if (this.data.Scale) {
- this.scaleX = this.data.Scale.X;
- this.scaleY = this.data.Scale.Y;
- }
- if (this.data.Rolate && this.data.Rolate.Z) {
- this.rolate = this.data.Rolate.Z;
- }
- if (this.data.Size) {
- this.width = this.data.Size.Width;
- this.height = this.data.Size.Height;
- }
- if (this.data.Properties && this.data.Properties.Line) {
- this.line = this.data.Properties.Line;
- }
- }
- get scaleX() {
- return this._scaleX;
- }
- set scaleX(v) {
- this._scaleX = v;
- if (this.data.Scale) {
- this.data.Scale.X = v;
- }
- this.update();
- }
- get scaleY() {
- return this._scaleY;
- }
- set scaleY(v) {
- this._scaleY = v;
- if (this.data.Scale) {
- this.data.Scale.Y = v;
- }
- this.update();
- }
- get rolate() {
- return this._rolate;
- }
- set rolate(v) {
- this._rolate = v;
- if (this.data.Rolate) {
- this.data.Rolate.Z = v;
- }
- this.update();
- }
- set name(v) {
- this.data.Name = v;
- }
- set line(arr) {
- if (this.data.Properties) {
- this.data.Properties.Line = arr;
- }
- }
- set x(v) {
- this.data.Pos.X = v;
- }
- set y(v) {
- this.data.Pos.Y = v;
- }
- set width(v) {
- if (this.data.Size) {
- this.data.Size.Width = v;
- }
- }
- set height(v) {
- if (this.data.Size) {
- this.data.Size.Height = v;
- }
- }
- }
- exports.SLineMarkerItem = SLineMarkerItem;
|