Skip to content

Commit a19fbca

Browse files
Merge pull request #1001 from davidbrochart/dragging
Rerender map when changing Map.dragging
2 parents 451b851 + bdb7384 commit a19fbca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

js/src/Map.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,19 @@ export class LeafletMapView extends utils.LeafletDOMWidgetView {
343343
this.rerender,
344344
this
345345
);
346+
this.listenTo(
347+
this.model,
348+
'change:dragging',
349+
function () {
350+
if (this.model.get('dragging')) {
351+
this.obj.dragging.enable();
352+
}
353+
else {
354+
this.obj.dragging.disable();
355+
}
356+
},
357+
this
358+
);
346359
this.listenTo(
347360
this.model,
348361
'change:layers',

0 commit comments

Comments
 (0)