Skip to content

Commit

Permalink
feat(SebmGoogleMap): support draggingCursor opt
Browse files Browse the repository at this point in the history
Closes #235
  • Loading branch information
sebholstein committed Mar 21, 2016
1 parent 00d26e5 commit 553842a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
19 changes: 14 additions & 5 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', 'draggableCursor'
'backgroundColor', 'draggableCursor', 'draggingCursor'
],
outputs: ['mapClick', 'mapRightClick', 'mapDblClick', 'centerChange'],
host: {'[class.sebm-google-map-container]': 'true'},
Expand Down Expand Up @@ -79,16 +79,24 @@ export class SebmGoogleMap implements OnChanges,
/**
* 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;'"
* least one fallback cursor that is not a URL. For example:
* [draggableCursor]="'url(http://www.example.com/icon.png), auto;'"
*/
draggableCursor: string;

/**
* The name or url of the cursor to display when the map is being dragged. 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:
* [draggingCursor]="'url(http://www.example.com/icon.png), auto;'"
*/
draggingCursor: string;

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

/**
* This event emitter gets emitted when the user clicks on the map (but not when they click on a
Expand Down Expand Up @@ -127,7 +135,8 @@ export class SebmGoogleMap implements OnChanges,
zoom: this._zoom,
disableDefaultUI: this.disableDefaultUI,
backgroundColor: this.backgroundColor,
draggableCursor: this.draggableCursor
draggableCursor: this.draggableCursor,
draggingCursor: this.draggingCursor
});
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 @@ -60,4 +60,5 @@ export interface MapOptions {
disableDefaultUI?: boolean;
backgroundColor?: string;
draggableCursor?: string;
draggingCursor?: string;
}

0 comments on commit 553842a

Please sign in to comment.