UNPKG

@totvs-agro/mobile-components

Version:

Componentes Mobile Totvs (Front-End) para utilização dos estilos do T-Faces e Ionic v3

46 lines 1.58 kB
var PontoShapeModel = /** @class */ (function () { function PontoShapeModel(latLng, marker) { this.latLng = latLng; this.marker = marker; this._selected = false; } PontoShapeModel.prototype.destroyMarker = function () { if (this.marker) { this.marker.remove(); } }; PontoShapeModel.prototype.changePosition = function (newPosition) { this.latLng = newPosition; this.marker.setPosition(newPosition); }; PontoShapeModel.prototype.isMiddlePoint = function () { return this._middle; }; PontoShapeModel.prototype.setMiddlePoint = function (middle) { this._middle = middle; }; PontoShapeModel.prototype.isSelected = function () { return this._selected; }; PontoShapeModel.prototype.setSelected = function (selected) { if (this._selected == selected) return; this._selected = selected; if (this._selected) { this.marker.setIcon({ url: './assets/images/marker-move.png' }); //this.marker.setDraggable(true); } else { this.marker.setIcon({ url: './assets/images/marker-point.png' }); //this.marker.setDraggable(false); } }; PontoShapeModel.prototype.unselectIfDiff = function (pointDiff) { if (pointDiff != this) { this.setSelected(false); } }; return PontoShapeModel; }()); export { PontoShapeModel }; //# sourceMappingURL=ponto-shape-model.js.map