all files / lib/ icon.directive.js

96.97% Statements 64/66
86.84% Branches 33/38
100% Functions 20/20
100% Lines 59/59
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174    25×   16×   23×     23× 23×                                                                                                                                                                                                                          
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) Eif (b.hasOwnProperty(p)) d[p] = b[p];
    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;
    Iif (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) {
    Iif (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var leaflet_1 = require("leaflet");
var consts_1 = require("./consts");
var IconDirective = (function (_super) {
    __extends(IconDirective, _super);
    function IconDirective() {
        var _this = _super.call(this, {
            iconUrl: consts_1.TRANSPARENT_PIXEL
        }) || this;
        _this.updateEvent = new core_1.EventEmitter();
        return _this;
    }
    Object.defineProperty(IconDirective.prototype, "iconUrl", {
        get: function () {
            return this.options.iconUrl;
        },
        set: function (val) {
            this.options.iconUrl = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconDirective.prototype, "iconSize", {
        get: function () {
            return this.options.iconSize;
        },
        set: function (val) {
            this.options.iconSize = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconDirective.prototype, "iconAnchor", {
        get: function () {
            return this.options.iconAnchor;
        },
        set: function (val) {
            this.options.iconAnchor = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconDirective.prototype, "popupAnchor", {
        get: function () {
            return this.options.popupAnchor;
        },
        set: function (val) {
            this.options.popupAnchor = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconDirective.prototype, "shadowUrl", {
        get: function () {
            return this.options.shadowUrl;
        },
        set: function (val) {
            this.options.shadowUrl = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconDirective.prototype, "shadowSize", {
        get: function () {
            return this.options.shadowSize;
        },
        set: function (val) {
            this.options.shadowSize = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconDirective.prototype, "shadowAnchor", {
        get: function () {
            return this.options.shadowAnchor;
        },
        set: function (val) {
            this.options.shadowAnchor = val;
            this.updateEvent.emit({
                target: this,
                type: 'update'
            });
        },
        enumerable: true,
        configurable: true
    });
    return IconDirective;
}(leaflet_1.Icon));
__decorate([
    core_1.Output('update'),
    __metadata("design:type", core_1.EventEmitter)
], IconDirective.prototype, "updateEvent", void 0);
__decorate([
    core_1.Input(),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], IconDirective.prototype, "iconUrl", null);
__decorate([
    core_1.Input(),
    __metadata("design:type", leaflet_1.Point),
    __metadata("design:paramtypes", [leaflet_1.Point])
], IconDirective.prototype, "iconSize", null);
__decorate([
    core_1.Input(),
    __metadata("design:type", leaflet_1.Point),
    __metadata("design:paramtypes", [leaflet_1.Point])
], IconDirective.prototype, "iconAnchor", null);
__decorate([
    core_1.Input(),
    __metadata("design:type", leaflet_1.Point),
    __metadata("design:paramtypes", [leaflet_1.Point])
], IconDirective.prototype, "popupAnchor", null);
__decorate([
    core_1.Input(),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], IconDirective.prototype, "shadowUrl", null);
__decorate([
    core_1.Input(),
    __metadata("design:type", leaflet_1.Point),
    __metadata("design:paramtypes", [leaflet_1.Point])
], IconDirective.prototype, "shadowSize", null);
__decorate([
    core_1.Input(),
    __metadata("design:type", leaflet_1.Point),
    __metadata("design:paramtypes", [leaflet_1.Point])
], IconDirective.prototype, "shadowAnchor", null);
IconDirective = __decorate([
    core_1.Directive({
        selector: 'yaga-icon'
    }),
    __metadata("design:paramtypes", [])
], IconDirective);
exports.IconDirective = IconDirective;
//# sourceMappingURL=icon.directive.js.map