UNPKG

@jmarcelof/leaflet-ng2

Version:
1,051 lines 45 kB
"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 __()); }; })(); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var leaflet_1 = require("leaflet"); var layer_group_provider_1 = require("./layer-group.provider"); var layer_provider_1 = require("./layer.provider"); var lng2lat_1 = require("./lng2lat"); /** * Angular2 directive for circle-markers of Leaflet. * * *You can use this directive in an Angular2 template after importing `YagaModule`.* * * How to use in a template: * ```html * <yaga-map> * <yaga-circle-marker * [(display)]="..." * [(stroke)]="..." * [(color)]="..." * [(weight)]="..." * [(opacity)]="..." * [(lineCap)]="..." * [(lineJoin)]="..." * [(dashArray)]="..." * [(dashOffset)]="..." * [(fill)]="..." * [(fillColor)]="..." * [(fillOpacity)]="..." * [(fillRule)]="..." * [(className)]="..." * [(lat)]="..." * [(lng)]="..." * [(radius)]="..." * * (click)="..." * (dblclick)="..." * (mousedown)="..." * (mouseup)="..." * (mouseover)="..." * (mouseout)="..." * (mousemove)="..." * (contextmenu)="..." * (keypress)="..." * (preclick)="..." * * [interactive]="..." * [properties]="..." * > * </yaga-circle-marker> * </yaga-map> * ``` * * @link http://leafletjs.com/reference-1.2.0.html#circlemarker Original Leaflet documentation * @link https://leaflet-ng2.yagajs.org/latest/browser-test?grep=Circle-Marker%20Directive Unit-Test * @link https://leaflet-ng2.yagajs.org/latest/coverage/lcov-report/lib/circle-marker.directive.js.html * Test coverage * @link https://leaflet-ng2.yagajs.org/latest/typedoc/classes/circle-marker.directive.js.html API documentation * @example https://leaflet-ng2.yagajs.org/latest/examples/circle-marker-directive/ */ var CircleMarkerDirective = /** @class */ (function (_super) { __extends(CircleMarkerDirective, _super); function CircleMarkerDirective(layerGroupProvider, layerProvider) { var _this = _super.call(this, [0, 0]) || this; _this.layerGroupProvider = layerGroupProvider; /** * Two-Way bound property for the display status of the geometry. * Use it with `<yaga-circle-marker [(display)]="someValue">` * or `<yaga-circle-marker (displayChange)="processEvent($event)">` */ _this.displayChange = new core_1.EventEmitter(); /** * Two-Way bound property for the stroke state of the geometry. * Use it with `<yaga-circle-marker [(stroke)]="someValue">` * or `<yaga-circle-marker (strokeChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-stroke Original Leaflet documentation */ _this.strokeChange = new core_1.EventEmitter(); /** * Two-Way bound property for the line-color of the geometry. * Use it with `<yaga-circle-marker [(color)]="someValue">` * or `<yaga-circle-marker (colorChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-color Original Leaflet documentation */ _this.colorChange = new core_1.EventEmitter(); /** * Two-Way bound property for the weight of the geometry. * Use it with `<yaga-circle-marker [(weight)]="someValue">` * or `<yaga-circle-marker (weightChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-weight Original Leaflet documentation */ _this.weightChange = new core_1.EventEmitter(); /** * Two-Way bound property for the opacity of the geometry. * Use it with `<yaga-circle-marker [(opacity)]="someValue">` * or `<yaga-circle-marker (opacityChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-opacity Original Leaflet documentation */ _this.opacityChange = new core_1.EventEmitter(); /** * Two-Way bound property for the lineCap of the geometry. * Use it with `<yaga-circle-marker [(lineCap)]="someValue">` * or `<yaga-circle-marker (lineCapChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-linecap Original Leaflet documentation */ _this.lineCapChange = new core_1.EventEmitter(); /** * Two-Way bound property for the lineJoin of the geometry. * Use it with `<yaga-circle-marker [(lineJoin)]="someValue">` * or `<yaga-circle-marker (lineJoinChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-linejoin Original Leaflet documentation */ _this.lineJoinChange = new core_1.EventEmitter(); /** * Two-Way bound property for the dashArray of the geometry. * Use it with `<yaga-circle-marker [(dashArray)]="someValue">` * or `<yaga-circle-marker (dashArrayChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-dasharray Original Leaflet documentation */ _this.dashArrayChange = new core_1.EventEmitter(); /** * Two-Way bound property for the dashOffset of the geometry. * Use it with `<yaga-circle-marker [(dashOffset)]="someValue">` * or `<yaga-circle-marker (dashOffsetChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-dashoffset Original Leaflet documentation */ _this.dashOffsetChange = new core_1.EventEmitter(); /** * Two-Way bound property for the fill state of the geometry. * Use it with `<yaga-circle-marker [(fill)]="someValue">` * or `<yaga-circle-marker (fillChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fill Original Leaflet documentation */ _this.fillChange = new core_1.EventEmitter(); /** * Two-Way bound property for the fill-color of the geometry. * Use it with `<yaga-circle-marker [(fillColor)]="someValue">` * or `<yaga-circle-marker (fillColorChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fillcolor Original Leaflet documentation */ _this.fillColorChange = new core_1.EventEmitter(); /** * Two-Way bound property for the fill-opacity of the geometry. * Use it with `<yaga-circle-marker [(fillOpacity)]="someValue">` * or `<yaga-circle-marker (fillOpacityChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fillopacity Original Leaflet documentation */ _this.fillOpacityChange = new core_1.EventEmitter(); /** * Two-Way bound property for the fill-rule of the geometry. * Use it with `<yaga-circle-marker [(fillRule)]="someValue">` * or `<yaga-circle-marker (fillRuleChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fillrule Original Leaflet documentation */ _this.fillRuleChange = new core_1.EventEmitter(); // @Output() public rendererChange: EventEmitter<number> = new EventEmitter(); /** * Two-Way bound property for the className of the geometry. * Use it with `<yaga-circle-marker [(className)]="someValue">` * or `<yaga-circle-marker (classNameChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-classname Original Leaflet documentation */ _this.classNameChange = new core_1.EventEmitter(); /** * Two-Way bound property for the css-style of the geometry. * Use it with `<yaga-circle-marker [(style)]="someValue">` * or `<yaga-circle-marker (styleChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setstyle Original Leaflet documentation */ _this.styleChange = new core_1.EventEmitter(); /** * Two-Way bound property for the latlng-position of the geometry. * Use it with `<yaga-circle-marker [(position)]="someValue">` * or `<yaga-circle-marker (positionChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setlatlng Original Leaflet documentation */ _this.positionChange = new core_1.EventEmitter(); /** * Two-Way bound property for the latitude of the geometry. * Use it with `<yaga-circle-marker [(lat)]="someValue">` * or `<yaga-circle-marker (latChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setlatlng Original Leaflet documentation */ _this.latChange = new core_1.EventEmitter(); /** * Two-Way bound property for the longitude of the geometry. * Use it with `<yaga-circle-marker [(lng)]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setlatlng Original Leaflet documentation * or `<yaga-circle-marker (lngChange)="processEvent($event)">` */ _this.lngChange = new core_1.EventEmitter(); /** * Two-Way bound property for the radius of the geometry. * Use it with `<yaga-circle-marker [(radius)]="someValue">` * or `<yaga-circle-marker (radiusChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setradius Original Leaflet documentation */ _this.radiusChange = new core_1.EventEmitter(); /** * Two-Way bound property for the geometry represented as GeoJSON. * Use it with `<yaga-circle-marker [(geoJSON)]="someValue">` * or `<yaga-circle-marker (geoJSONChange)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-togeojson Original Leaflet documentation */ _this.geoJSONChange = new core_1.EventEmitter(); /** * From leaflet fired add event. * Use it with `<yaga-circle-marker (add)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-add Original Leaflet documentation */ _this.addEvent = new core_1.EventEmitter(); /** * From leaflet fired remove event. * Use it with `<yaga-circle-marker (remove)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-remove Original Leaflet documentation */ _this.removeEvent = new core_1.EventEmitter(); /** * From leaflet fired popupopen event. * Use it with `<yaga-circle-marker (popupopen)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-popupopen Original Leaflet documentation */ _this.popupopenEvent = new core_1.EventEmitter(); /** * From leaflet fired popupclose event. * Use it with `<yaga-circle-marker (popupclose)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-popupclose Original Leaflet documentation */ _this.popupcloseEvent = new core_1.EventEmitter(); /** * From leaflet fired tooltipopen event. * Use it with `<yaga-circle-marker (tooltipopen)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-tooltipopen Original Leaflet documentation */ _this.tooltipopenEvent = new core_1.EventEmitter(); /** * From leaflet fired tooltipclose event. * Use it with `<yaga-circle-marker (tooltipclose)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-tooltipclose Original Leaflet documentation */ _this.tooltipcloseEvent = new core_1.EventEmitter(); /** * From leaflet fired click event. * Use it with `<yaga-circle-marker (click)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-click Original Leaflet documentation */ _this.clickEvent = new core_1.EventEmitter(); /** * From leaflet fired dblclick event. * Use it with `<yaga-circle-marker (dblclick)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-dblclick Original Leaflet documentation */ _this.dblclickEvent = new core_1.EventEmitter(); /** * From leaflet fired mousedown event. * Use it with `<yaga-circle-marker (mousedown)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-mousedown Original Leaflet documentation */ _this.mousedownEvent = new core_1.EventEmitter(); /** * From leaflet fired mouseover event. * Use it with `<yaga-circle-marker (mouseover)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-mouseover Original Leaflet documentation */ _this.mouseoverEvent = new core_1.EventEmitter(); /** * From leaflet fired mouseout event. * Use it with `<yaga-circle-marker (mouseout)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-mouseout Original Leaflet documentation */ _this.mouseoutEvent = new core_1.EventEmitter(); /** * From leaflet fired contextmenu event. * Use it with `<yaga-circle-marker (contextmenu)="processEvent($event)">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-contextmenu Original Leaflet documentation */ _this.contextmenuEvent = new core_1.EventEmitter(); _this.initialized = false; layerProvider.ref = _this; _this.feature = _this.feature || { geometry: { type: "Point", coordinates: [] }, properties: {}, type: "Feature", }; _this.feature.properties = _this.feature.properties || {}; _this.on("remove", function () { _this.displayChange.emit(false); }); _this.on("add", function () { _this.displayChange.emit(true); }); _this.layerGroupProvider.ref.addLayer(_this); // Events _this.on("add", function (event) { _this.addEvent.emit(event); }); _this.on("remove", function (event) { _this.removeEvent.emit(event); }); _this.on("popupopen", function (event) { _this.popupopenEvent.emit(event); }); _this.on("popupclose", function (event) { _this.popupcloseEvent.emit(event); }); _this.on("tooltipopen", function (event) { _this.tooltipopenEvent.emit(event); }); _this.on("tooltipclose", function (event) { _this.tooltipcloseEvent.emit(event); }); _this.on("click", function (event) { _this.clickEvent.emit(event); }); _this.on("dblclick", function (event) { _this.dblclickEvent.emit(event); }); _this.on("mousedown", function (event) { _this.mousedownEvent.emit(event); }); _this.on("mouseover", function (event) { _this.mouseoverEvent.emit(event); }); _this.on("mouseout", function (event) { _this.mouseoutEvent.emit(event); }); _this.on("contextmenu", function (event) { _this.contextmenuEvent.emit(event); }); return _this; } /** * Internal method that provides the initialization of the child popup or tooltip */ CircleMarkerDirective.prototype.ngAfterContentInit = function () { this.initialized = true; }; /** * Internal method to provide the removal of the layer in Leaflet, when removing it from the Angular template */ CircleMarkerDirective.prototype.ngOnDestroy = function () { this.removeFrom(this.layerGroupProvider.ref); }; /** * Derived method of the original setLatLng. * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setlatlng Original Leaflet documentation */ CircleMarkerDirective.prototype.setLatLng = function (val) { _super.prototype.setLatLng.call(this, val); if (!this.initialized) { return this; } this.positionChange.emit(this._latlng); this.latChange.emit(this._latlng.lat); this.lngChange.emit(this._latlng.lng); this.geoJSONChange.emit(this.geoJSON); return this; }; Object.defineProperty(CircleMarkerDirective.prototype, "position", { get: function () { return this._latlng; }, /** * Two-Way bound property for the position of the circle. * Use it with `<yaga-circle-marker [(position)]="someValue">` or `<yaga-circle-marker [position]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-l-circlemarker Original Leaflet documentation */ set: function (val) { this.setLatLng(val); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "lat", { get: function () { return this._latlng.lat; }, /** * Two-Way bound property for the latitude (position) of the circle. * Use it with `<yaga-circle-marker [(lat)]="someValue">` or `<yaga-circle-marker [lat]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-l-circlemarker Original Leaflet documentation */ set: function (val) { this.setLatLng([val, this.lng]); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "lng", { get: function () { return this._latlng.lng; }, /** * Two-Way bound property for the longitude (position) of the circle. * Use it with `<yaga-circle-marker [(lng)]="someValue">` or `<yaga-circle-marker [lng]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-l-circlemarker Original Leaflet documentation */ set: function (val) { this.setLatLng([this.lat, val]); }, enumerable: true, configurable: true }); /** * Derived method of the original setRadius. * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setradius Original Leaflet documentation */ CircleMarkerDirective.prototype.setRadius = function (val) { _super.prototype.setRadius.call(this, val); this.radiusChange.emit(val); return this; }; Object.defineProperty(CircleMarkerDirective.prototype, "radius", { get: function () { return this.getRadius(); }, /** * Two-Way bound property for the radius of the circle. * Use it with `<yaga-circle-marker [(radius)]="someValue">` or `<yaga-circle-marker [radius]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-radius Original Leaflet documentation */ set: function (val) { this.setRadius(val); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "geoJSON", { get: function () { return this.toGeoJSON(); }, /** * Two-Way bound property for the geoJSON data. * Use it with `<yaga-circle-marker [(geoJSON)]="someValue">` or `<yaga-circle-marker [geoJSONChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-togeojson Original Leaflet documentation */ set: function (val) { this.feature.properties = val.properties; var geomType = val.geometry.type; // Normally "Point" /* istanbul ignore if */ if (geomType !== "Point") { throw new Error("Unsupported geometry type: " + geomType); } this.setLatLng(lng2lat_1.lng2lat(val.geometry.coordinates)); }, enumerable: true, configurable: true }); /** * Derived method of the original setStyle. * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-setstyle Original Leaflet documentation */ CircleMarkerDirective.prototype.setStyle = function (style) { _super.prototype.setStyle.call(this, style); if (style.hasOwnProperty("stroke")) { this.strokeChange.emit(style.stroke); } if (style.hasOwnProperty("color")) { this.colorChange.emit(style.color); } if (style.hasOwnProperty("weight")) { this.weightChange.emit(style.weight); } if (style.hasOwnProperty("opacity")) { this.opacityChange.emit(style.opacity); } if (style.hasOwnProperty("lineCap")) { this.lineCapChange.emit(style.lineCap); } if (style.hasOwnProperty("lineJoin")) { this.lineJoinChange.emit(style.lineJoin); } if (style.hasOwnProperty("dashArray")) { this.dashArrayChange.emit(style.dashArray); } if (style.hasOwnProperty("dashOffset")) { this.dashOffsetChange.emit(style.dashOffset); } if (style.hasOwnProperty("fill")) { this.fillChange.emit(style.fill); } if (style.hasOwnProperty("fillColor")) { this.fillColorChange.emit(style.fillColor); } if (style.hasOwnProperty("fillOpacity")) { this.fillOpacityChange.emit(style.fillOpacity); } if (style.hasOwnProperty("fillRule")) { this.fillRuleChange.emit(style.fillRule); } if (style.hasOwnProperty("className")) { this.classNameChange.emit(style.className); } this.styleChange.emit(style); return this; }; Object.defineProperty(CircleMarkerDirective.prototype, "opacity", { get: function () { return this.options.opacity; }, /** * Two-Way bound property for the opacity. * Use it with `<yaga-circle-marker [(opacity)]="someValue">` or `<yaga-circle-marker [opacityChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-opacity Original Leaflet documentation */ set: function (val) { this.setStyle({ opacity: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "stroke", { get: function () { if (this.options.hasOwnProperty("stroke") && this.options.stroke !== undefined) { return this.options.stroke; } return true; }, /** * Two-Way bound property for the stroke. * Use it with `<yaga-circle-marker [(stroke)]="someValue">` or `<yaga-circle-marker [strokeChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-stroke Original Leaflet documentation */ set: function (val) { this.setStyle({ stroke: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "color", { get: function () { return this.options.color; }, /** * Two-Way bound property for the color. * Use it with `<yaga-circle-marker [(color)]="someValue">` or `<yaga-circle-marker [colorChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-color Original Leaflet documentation */ set: function (val) { this.setStyle({ color: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "weight", { get: function () { return this.options.weight; }, /** * Two-Way bound property for the weight. * Use it with `<yaga-circle-marker [(weight)]="someValue">` or `<yaga-circle-marker [weightChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-weight Original Leaflet documentation */ set: function (val) { this.setStyle({ weight: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "lineCap", { get: function () { return this.options.lineCap; }, /** * Two-Way bound property for the lineCap. * Use it with `<yaga-circle-marker [(lineCap)]="someValue">` or `<yaga-circle-marker [lineCapChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-linecap Original Leaflet documentation */ set: function (val) { this.setStyle({ lineCap: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "lineJoin", { get: function () { return this.options.lineJoin; }, /** * Two-Way bound property for the lineJoin. * Use it with `<yaga-circle-marker [(lineJoin)]="someValue">` * or `<yaga-circle-marker [lineJoinChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-linejoin Original Leaflet documentation */ set: function (val) { this.setStyle({ lineJoin: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "dashArray", { get: function () { return this.options.dashArray; }, /** * Two-Way bound property for the dashArray. * Use it with `<yaga-circle-marker [(dashArray)]="someValue">` * or `<yaga-circle-marker [dashArrayChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-dasharray Original Leaflet documentation */ set: function (val) { this.setStyle({ dashArray: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "dashOffset", { get: function () { return this.options.dashOffset; }, /** * Two-Way bound property for the dashOffset. * Use it with `<yaga-circle-marker [(dashOffset)]="someValue">` * or `<yaga-circle-marker [dashOffsetChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-dashoffset Original Leaflet documentation */ set: function (val) { this.setStyle({ dashOffset: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "fill", { get: function () { return this.options.fill || false; }, /** * Two-Way bound property for the fill. * Use it with `<yaga-circle-marker [(fill)]="someValue">` or `<yaga-circle-marker [fillChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fill Original Leaflet documentation */ set: function (val) { this.setStyle({ fill: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "fillColor", { get: function () { return this.options.fillColor; }, /** * Two-Way bound property for the fillColor. * Use it with `<yaga-circle-marker [(fillColor)]="someValue">` * or `<yaga-circle-marker [fillColorChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fillcolor Original Leaflet documentation */ set: function (val) { this.setStyle({ fillColor: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "fillOpacity", { get: function () { return this.options.fillOpacity; }, /** * Two-Way bound property for the fillOpacity. * Use it with `<yaga-circle-marker [(fillOpacity)]="someValue">` * or `<yaga-circle-marker [fillOpacityChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fillopacity Original Leaflet documentation */ set: function (val) { this.setStyle({ fillOpacity: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "fillRule", { get: function () { return this.options.fillRule; }, /** * Two-Way bound property for the fillRule. * Use it with `<yaga-circle-marker [(fillRule)]="someValue">` * or `<yaga-circle-marker [fillRuleChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-fillrule Original Leaflet documentation */ set: function (val) { this.setStyle({ fillRule: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "className", { get: function () { return this.options.className; }, /** * Two-Way bound property for the className. * Use it with `<yaga-circle-marker [(className)]="someValue">` * or `<yaga-circle-marker [classNameChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-classname Original Leaflet documentation */ set: function (val) { this.setStyle({ className: val }); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "style", { get: function () { return this.options; }, /** * Two-Way bound property for the opacity. * Use it with `<yaga-circle-marker [(style)]="someValue">` or `<yaga-circle-marker [styleChange]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#circlemarker-style Original Leaflet documentation */ set: function (val) { this.setStyle(val); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "display", { get: function () { var container; try { container = this.getElement(); } catch (err) { /* istanbul ignore next */ return false; } return container.style.display !== "none" && !!container.parentElement; }, /** * Two-Way bound property for the display state. * Use it with `<yaga-circle-marker [(display)]="someValue">` or `<yaga-circle-marker [displayChange]="someValue">` */ set: function (val) { var isDisplayed = this.display; if (isDisplayed === val) { return; } var container; try { container = this.getElement(); } catch (err) { /* istanbul ignore next */ return; } this.displayChange.emit(val); container.style.display = val ? "" : "none"; }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "interactive", { get: function () { return !!this.options.interactive; }, /** * Input for the GeoJSON properties. * Use it with `<yaga-circle-marker [interactive]="someValue">` * @link http://leafletjs.com/reference-1.2.0.html#tilelayer-interactive Original Leaflet documentation */ set: function (val) { var map = this._map; this.options.interactive = val; this.onRemove(map); this.onAdd(map); }, enumerable: true, configurable: true }); Object.defineProperty(CircleMarkerDirective.prototype, "properties", { get: function () { return this.feature.properties; }, set: function (val) { this.feature.properties = val; this.geoJSONChange.emit(this.geoJSON); }, enumerable: true, configurable: true }); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "displayChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "strokeChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "colorChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "weightChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "opacityChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "lineCapChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "lineJoinChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "dashArrayChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "dashOffsetChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "fillChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "fillColorChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "fillOpacityChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "fillRuleChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "classNameChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "styleChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "positionChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "latChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "lngChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "radiusChange", void 0); __decorate([ core_1.Output(), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "geoJSONChange", void 0); __decorate([ core_1.Output("add"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "addEvent", void 0); __decorate([ core_1.Output("remove"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "removeEvent", void 0); __decorate([ core_1.Output("popupopen"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "popupopenEvent", void 0); __decorate([ core_1.Output("popupclose"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "popupcloseEvent", void 0); __decorate([ core_1.Output("tooltipopen"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "tooltipopenEvent", void 0); __decorate([ core_1.Output("tooltipclose"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "tooltipcloseEvent", void 0); __decorate([ core_1.Output("click"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "clickEvent", void 0); __decorate([ core_1.Output("dblclick"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "dblclickEvent", void 0); __decorate([ core_1.Output("mousedown"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "mousedownEvent", void 0); __decorate([ core_1.Output("mouseover"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "mouseoverEvent", void 0); __decorate([ core_1.Output("mouseout"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "mouseoutEvent", void 0); __decorate([ core_1.Output("contextmenu"), __metadata("design:type", core_1.EventEmitter) ], CircleMarkerDirective.prototype, "contextmenuEvent", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "position", null); __decorate([ core_1.Input(), __metadata("design:type", Number), __metadata("design:paramtypes", [Number]) ], CircleMarkerDirective.prototype, "lat", null); __decorate([ core_1.Input(), __metadata("design:type", Number), __metadata("design:paramtypes", [Number]) ], CircleMarkerDirective.prototype, "lng", null); __decorate([ core_1.Input(), __metadata("design:type", Number), __metadata("design:paramtypes", [Number]) ], CircleMarkerDirective.prototype, "radius", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "geoJSON", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "opacity", null); __decorate([ core_1.Input(), __metadata("design:type", Boolean), __metadata("design:paramtypes", [Boolean]) ], CircleMarkerDirective.prototype, "stroke", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "color", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "weight", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "lineCap", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "lineJoin", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "dashArray", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "dashOffset", null); __decorate([ core_1.Input(), __metadata("design:type", Boolean), __metadata("design:paramtypes", [Boolean]) ], CircleMarkerDirective.prototype, "fill", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "fillColor", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "fillOpacity", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "fillRule", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "className", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "style", null); __decorate([ core_1.Input(), __metadata("design:type", Boolean), __metadata("design:paramtypes", [Boolean]) ], CircleMarkerDirective.prototype, "display", null); __decorate([ core_1.Input(), __metadata("design:type", Boolean), __metadata("design:paramtypes", [Boolean]) ], CircleMarkerDirective.prototype, "interactive", null); __decorate([ core_1.Input(), __metadata("design:type", Object), __metadata("design:paramtypes", [Object]) ], CircleMarkerDirective.prototype, "properties", null); CircleMarkerDirective = __decorate([ core_1.Directive({ providers: [layer_provider_1.LayerProvider], selector: "yaga-circle-marker", }), __metadata("design:paramtypes", [layer_group_provider_1.LayerGroupProvider, layer_provider_1.LayerProvider]) ], CircleMarkerDirective); return CircleMarkerDirective; }(leaflet_1.CircleMarker)); exports.CircleMarkerDirective = CircleMarkerDirective; //# sourceMappingURL=circle-marker.directive.js.map