Skip to content

Commit ef8ba0d

Browse files
mbehrlichmmalerba
authored andcommitted
fix(google-maps): Fix clickable input for MapMarker (#17396)
Fix default behavior of the clickable input for the MapMarker component. Clickable should be true by default to match the Google Maps JavaScript API, but currently is false by default.
1 parent 43c7a7d commit ef8ba0d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/google-maps/map-marker/map-marker.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,32 +360,32 @@ export class MapMarker implements OnInit, OnDestroy {
360360

361361
private _watchForTitleChanges() {
362362
this._title.pipe(takeUntil(this._destroy)).subscribe(title => {
363-
if (this._marker) {
364-
this._marker.setTitle(title !== undefined ? title : null);
363+
if (this._marker && title !== undefined) {
364+
this._marker.setTitle(title);
365365
}
366366
});
367367
}
368368

369369
private _watchForPositionChanges() {
370370
this._position.pipe(takeUntil(this._destroy)).subscribe(position => {
371-
if (this._marker) {
372-
this._marker.setPosition(position || null);
371+
if (this._marker && position) {
372+
this._marker.setPosition(position);
373373
}
374374
});
375375
}
376376

377377
private _watchForLabelChanges() {
378378
this._label.pipe(takeUntil(this._destroy)).subscribe(label => {
379-
if (this._marker) {
380-
this._marker.setLabel(label !== undefined ? label : null);
379+
if (this._marker && label !== undefined) {
380+
this._marker.setLabel(label);
381381
}
382382
});
383383
}
384384

385385
private _watchForClickableChanges() {
386386
this._clickable.pipe(takeUntil(this._destroy)).subscribe(clickable => {
387-
if (this._marker) {
388-
this._marker.setClickable(!!clickable);
387+
if (this._marker && clickable !== undefined) {
388+
this._marker.setClickable(clickable);
389389
}
390390
});
391391
}

0 commit comments

Comments
 (0)