Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 553842a

Browse files
committed
feat(SebmGoogleMap): support draggingCursor opt
Closes #235
1 parent 00d26e5 commit 553842a

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/directives/google-map.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {MouseEvent} from '../events';
3434
providers: [GoogleMapsAPIWrapper, MarkerManager],
3535
inputs: [
3636
'longitude', 'latitude', 'zoom', 'disableDoubleClickZoom', 'disableDefaultUI', 'scrollwheel',
37-
'backgroundColor', 'draggableCursor'
37+
'backgroundColor', 'draggableCursor', 'draggingCursor'
3838
],
3939
outputs: ['mapClick', 'mapRightClick', 'mapDblClick', 'centerChange'],
4040
host: {'[class.sebm-google-map-container]': 'true'},
@@ -79,16 +79,24 @@ export class SebmGoogleMap implements OnChanges,
7979
/**
8080
* The name or url of the cursor to display when mousing over a draggable map. This property uses
8181
* the css * cursor attribute to change the icon. As with the css property, you must specify at
82-
* least one fallback * cursor that is not a URL. For example:
83-
* draggableCursor="'url(http://www.example.com/icon.png), auto;'"
82+
* least one fallback cursor that is not a URL. For example:
83+
* [draggableCursor]="'url(http://www.example.com/icon.png), auto;'"
8484
*/
8585
draggableCursor: string;
8686

87+
/**
88+
* The name or url of the cursor to display when the map is being dragged. This property uses the
89+
* css cursor attribute to change the icon. As with the css property, you must specify at least
90+
* one fallback cursor that is not a URL. For example:
91+
* [draggingCursor]="'url(http://www.example.com/icon.png), auto;'"
92+
*/
93+
draggingCursor: string;
94+
8795
/**
8896
* Map option attributes that can change over time
8997
*/
9098
private static _mapOptionsAttributes: string[] =
91-
['disableDoubleClickZoom', 'scrollwheel', 'draggableCursor'];
99+
['disableDoubleClickZoom', 'scrollwheel', 'draggableCursor', 'draggingCursor'];
92100

93101
/**
94102
* This event emitter gets emitted when the user clicks on the map (but not when they click on a
@@ -127,7 +135,8 @@ export class SebmGoogleMap implements OnChanges,
127135
zoom: this._zoom,
128136
disableDefaultUI: this.disableDefaultUI,
129137
backgroundColor: this.backgroundColor,
130-
draggableCursor: this.draggableCursor
138+
draggableCursor: this.draggableCursor,
139+
draggingCursor: this.draggingCursor
131140
});
132141
this._handleMapCenterChange();
133142
this._handleMapZoomChange();

src/services/google-maps-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ export interface MapOptions {
6060
disableDefaultUI?: boolean;
6161
backgroundColor?: string;
6262
draggableCursor?: string;
63+
draggingCursor?: string;
6364
}

0 commit comments

Comments
 (0)