-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
packages/devextreme-angular/src/ui/map/nested/google-map-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* tslint:disable:max-line-length */ | ||
|
||
|
||
import { | ||
Component, | ||
OnInit, | ||
OnDestroy, | ||
NgModule, | ||
Host, | ||
SkipSelf, | ||
Input | ||
} from '@angular/core'; | ||
|
||
|
||
|
||
|
||
|
||
import { | ||
NestedOptionHost, | ||
} from 'devextreme-angular/core'; | ||
import { NestedOption } from 'devextreme-angular/core'; | ||
|
||
|
||
@Component({ | ||
selector: 'dxo-map-google-map-config', | ||
template: '', | ||
styles: [''], | ||
providers: [NestedOptionHost] | ||
}) | ||
export class DxoMapGoogleMapConfigComponent extends NestedOption implements OnDestroy, OnInit { | ||
@Input() | ||
get mapId(): string { | ||
return this._getOption('mapId'); | ||
} | ||
set mapId(value: string) { | ||
this._setOption('mapId', value); | ||
} | ||
|
||
@Input() | ||
get useAdvancedMarkers(): boolean { | ||
return this._getOption('useAdvancedMarkers'); | ||
} | ||
set useAdvancedMarkers(value: boolean) { | ||
this._setOption('useAdvancedMarkers', value); | ||
} | ||
|
||
|
||
protected get _optionPath() { | ||
return 'googleMapConfig'; | ||
} | ||
|
||
|
||
constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, | ||
@Host() optionHost: NestedOptionHost) { | ||
super(); | ||
parentOptionHost.setNestedOption(this); | ||
optionHost.setHost(this, this._fullOptionPath.bind(this)); | ||
} | ||
|
||
|
||
ngOnInit() { | ||
this._addRecreatedComponent(); | ||
} | ||
|
||
ngOnDestroy() { | ||
this._addRemovedOption(this._getOptionPath()); | ||
} | ||
|
||
|
||
} | ||
|
||
@NgModule({ | ||
declarations: [ | ||
DxoMapGoogleMapConfigComponent | ||
], | ||
exports: [ | ||
DxoMapGoogleMapConfigComponent | ||
], | ||
}) | ||
export class DxoMapGoogleMapConfigModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
packages/devextreme-angular/src/ui/nested/google-map-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* tslint:disable:max-line-length */ | ||
|
||
|
||
import { | ||
Component, | ||
OnInit, | ||
OnDestroy, | ||
NgModule, | ||
Host, | ||
SkipSelf, | ||
Input | ||
} from '@angular/core'; | ||
|
||
|
||
|
||
|
||
|
||
import { | ||
NestedOptionHost, | ||
} from 'devextreme-angular/core'; | ||
import { NestedOption } from 'devextreme-angular/core'; | ||
|
||
|
||
@Component({ | ||
selector: 'dxo-google-map-config', | ||
template: '', | ||
styles: [''], | ||
providers: [NestedOptionHost] | ||
}) | ||
export class DxoGoogleMapConfigComponent extends NestedOption implements OnDestroy, OnInit { | ||
@Input() | ||
get mapId(): string { | ||
return this._getOption('mapId'); | ||
} | ||
set mapId(value: string) { | ||
this._setOption('mapId', value); | ||
} | ||
|
||
@Input() | ||
get useAdvancedMarkers(): boolean { | ||
return this._getOption('useAdvancedMarkers'); | ||
} | ||
set useAdvancedMarkers(value: boolean) { | ||
this._setOption('useAdvancedMarkers', value); | ||
} | ||
|
||
|
||
protected get _optionPath() { | ||
return 'googleMapConfig'; | ||
} | ||
|
||
|
||
constructor(@SkipSelf() @Host() parentOptionHost: NestedOptionHost, | ||
@Host() optionHost: NestedOptionHost) { | ||
super(); | ||
parentOptionHost.setNestedOption(this); | ||
optionHost.setHost(this, this._fullOptionPath.bind(this)); | ||
} | ||
|
||
|
||
ngOnInit() { | ||
this._addRecreatedComponent(); | ||
} | ||
|
||
ngOnDestroy() { | ||
this._addRemovedOption(this._getOptionPath()); | ||
} | ||
|
||
|
||
} | ||
|
||
@NgModule({ | ||
declarations: [ | ||
DxoGoogleMapConfigComponent | ||
], | ||
exports: [ | ||
DxoGoogleMapConfigComponent | ||
], | ||
}) | ||
export class DxoGoogleMapConfigModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters