/*! * devextreme-angular-test * Version: 17.2.8 * Build date: Mon Feb 05 2018 * * Copyright (c) 2012 - 2018 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-angular */ import { Component, NgModule, Host, SkipSelf, Input, ContentChildren, forwardRef, QueryList } from '@angular/core'; import { NestedOptionHost } from '../../core/nested-option'; import { CollectionNestedOption } from '../../core/nested-option'; import { DxiLocationComponent } from './location-dxi'; @Component({ selector: 'dxi-marker', template: '', styles: [''], providers: [NestedOptionHost] }) export class DxiMarkerComponent extends CollectionNestedOption { @Input() get iconSrc(): string { return this._getOption('iconSrc'); } set iconSrc(value: string) { this._setOption('iconSrc', value); } @Input() get location(): string| Array { return this._getOption('location'); } set location(value: string| Array) { this._setOption('location', value); } @Input() get onClick(): Function { return this._getOption('onClick'); } set onClick(value: Function) { this._setOption('onClick', value); } @Input() get tooltip(): string| { isShown?: boolean, text?: string } { return this._getOption('tooltip'); } set tooltip(value: string| { isShown?: boolean, text?: string }) { this._setOption('tooltip', value); } @Input() get attributes(): any { return this._getOption('attributes'); } set attributes(value: any) { this._setOption('attributes', value); } @Input() get coordinates(): Array { return this._getOption('coordinates'); } set coordinates(value: Array) { this._setOption('coordinates', value); } @Input() get text(): string { return this._getOption('text'); } set text(value: string) { this._setOption('text', value); } @Input() get url(): string { return this._getOption('url'); } set url(value: string) { this._setOption('url', value); } @Input() get value(): number { return this._getOption('value'); } set value(value: number) { this._setOption('value', value); } @Input() get values(): Array { return this._getOption('values'); } set values(value: Array) { this._setOption('values', value); } protected get _optionPath() { return 'markers'; } @ContentChildren(forwardRef(() => DxiLocationComponent)) get locationChildren(): QueryList { return this._getOption('location'); } set locationChildren(value) { this.setChildren('location', value); } constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, @Host() optionHost: NestedOptionHost) { super(); parentOptionHost.setNestedOption(this); optionHost.setHost(this, this._fullOptionPath.bind(this)); } } @NgModule({ declarations: [ DxiMarkerComponent ], exports: [ DxiMarkerComponent ], }) export class DxiMarkerModule { }