Skip to content

Commit

Permalink
feat(SebmGoogleMap): support draggableCursor opt
Browse files Browse the repository at this point in the history
Closes #234
  • Loading branch information
sebholstein committed Mar 21, 2016
1 parent bda7ca8 commit 00d26e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/directives/google-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {MouseEvent} from '../events';
providers: [GoogleMapsAPIWrapper, MarkerManager],
inputs: [
'longitude', 'latitude', 'zoom', 'disableDoubleClickZoom', 'disableDefaultUI', 'scrollwheel',
'backgroundColor'
'backgroundColor', 'draggableCursor'
],
outputs: ['mapClick', 'mapRightClick', 'mapDblClick', 'centerChange'],
host: {'[class.sebm-google-map-container]': 'true'},
Expand Down Expand Up @@ -76,10 +76,19 @@ export class SebmGoogleMap implements OnChanges,
*/
backgroundColor: string;

/**
* The name or url of the cursor to display when mousing over a draggable map. This property uses
* the css * cursor attribute to change the icon. As with the css property, you must specify at
* least one fallback * cursor that is not a URL. For example:
* draggableCursor="'url(http://www.example.com/icon.png), auto;'"
*/
draggableCursor: string;

/**
* Map option attributes that can change over time
*/
private static _mapOptionsAttributes: string[] = ['disableDoubleClickZoom', 'scrollwheel'];
private static _mapOptionsAttributes: string[] =
['disableDoubleClickZoom', 'scrollwheel', 'draggableCursor'];

/**
* This event emitter gets emitted when the user clicks on the map (but not when they click on a
Expand Down Expand Up @@ -117,7 +126,8 @@ export class SebmGoogleMap implements OnChanges,
center: {lat: this._latitude, lng: this._longitude},
zoom: this._zoom,
disableDefaultUI: this.disableDefaultUI,
backgroundColor: this.backgroundColor
backgroundColor: this.backgroundColor,
draggableCursor: this.draggableCursor
});
this._handleMapCenterChange();
this._handleMapZoomChange();
Expand Down
1 change: 1 addition & 0 deletions src/services/google-maps-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ export interface MapOptions {
disableDoubleClickZoom?: boolean;
disableDefaultUI?: boolean;
backgroundColor?: string;
draggableCursor?: string;
}

0 comments on commit 00d26e5

Please sign in to comment.