@@ -353,7 +353,7 @@ require("./fixup-default-icon");
353
353
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
354
354
355
355
window . LeafletWidget = { } ;
356
- window . LeafletWidget . methods = { } ;
356
+ var methods = window . LeafletWidget . methods = _jquery2 . default . extend ( { } , _methods2 . default ) ;
357
357
358
358
// Send updated bounds back to app. Takes a leaflet event object as input.
359
359
function updateBounds ( map ) {
@@ -511,7 +511,7 @@ _htmlwidgets2.default.widget({
511
511
}
512
512
if ( data . fitBounds ) {
513
513
explicitView = true ;
514
- _methods2 . default . fitBounds . apply ( map , data . fitBounds ) ;
514
+ methods . fitBounds . apply ( map , data . fitBounds ) ;
515
515
}
516
516
517
517
// Returns true if the zoomToLimits option says that the map should be
@@ -541,7 +541,7 @@ _htmlwidgets2.default.widget({
541
541
542
542
for ( var i = 0 ; data . calls && i < data . calls . length ; i ++ ) {
543
543
var call = data . calls [ i ] ;
544
- if ( _methods2 . default [ call . method ] ) _methods2 . default [ call . method ] . apply ( map , call . args ) ; else ( 0 , _util . log ) ( "Unknown method " + call . method ) ;
544
+ if ( methods [ call . method ] ) methods [ call . method ] . apply ( map , call . args ) ; else ( 0 , _util . log ) ( "Unknown method " + call . method ) ;
545
545
}
546
546
547
547
map . leafletr . hasRendered = true ;
@@ -575,7 +575,7 @@ if (_htmlwidgets2.default.shinyMode) {
575
575
if ( call . dependencies ) {
576
576
_shiny2 . default . renderDependencies ( call . dependencies ) ;
577
577
}
578
- if ( _methods2 . default [ call . method ] ) _methods2 . default [ call . method ] . apply ( map , call . args ) ; else ( 0 , _util . log ) ( "Unknown method " + call . method ) ;
578
+ if ( methods [ call . method ] ) methods [ call . method ] . apply ( map , call . args ) ; else ( 0 , _util . log ) ( "Unknown method " + call . method ) ;
579
579
}
580
580
} ) ;
581
581
}
0 commit comments