From 0d1eae32be3bc0269ec01e82cbe8874d4df618a8 Mon Sep 17 00:00:00 2001 From: Thach Hoang Date: Tue, 28 Mar 2017 02:40:48 -0400 Subject: [PATCH] Fix debug examples after rollup (#5417) Fix #5373. - Remove references to removed file "../../build/deps.js" - Update leaflet-include.js to point to "../dist/leaflet-src.js" - Update watch to use the same destination file as rollup (dist/leaflet-src.js) - Define getRandomLatLng where used --- build/rollup-watch-config.js | 2 +- debug/hacks/jitter.html | 1 - debug/leaflet-include.js | 2 +- debug/map/canvas.html | 1 - debug/map/control-layers.html | 1 - debug/map/controls.html | 1 - debug/map/geolocation.html | 1 - debug/map/grid.html | 1 - debug/map/image-overlay.html | 1 - debug/map/layer_remove_add.html | 1 - debug/map/map-mobile.html | 1 - debug/map/map-popup.html | 1 - debug/map/map.html | 15 ++++++- debug/map/markers.html | 1 - debug/map/max-bounds-bouncy.html | 1 - debug/map/max-bounds-infinite.html | 1 - debug/map/max-bounds.html | 1 - debug/map/opacity.html | 1 - debug/map/popup.html | 45 ++++++++++++-------- debug/map/rollup.html | 3 +- debug/map/scroll.html | 1 - debug/map/simple-proj.html | 1 - debug/map/tile-debug.html | 1 - debug/map/tile-opacity.html | 1 - debug/map/tooltip.html | 1 - debug/map/wms-marble.html | 1 - debug/map/wms.html | 1 - debug/map/zoom-delta.html | 1 - debug/map/zoom-remain-centered.html | 1 - debug/map/zoomlevels.html | 15 ++++++- debug/map/zoompan.html | 1 - debug/tests/add_remove_layers.html | 1 - debug/tests/bringtoback.html | 1 - debug/tests/canvasloop.html | 1 - debug/tests/click_on_canvas.html | 1 - debug/tests/custom-panes.html | 1 - debug/tests/detached-dom-memory-leak.html | 1 - debug/tests/doubleclick-events-slowdown.html | 14 +++++- debug/tests/dragging_and_copyworldjump.html | 1 - debug/tests/dragging_cursors.html | 1 - debug/tests/event-perf-2.html | 15 ++++++- debug/tests/event-perf.html | 1 - debug/tests/mousemove_on_polygons.html | 1 - debug/tests/opacity.html | 1 - debug/tests/popup_offset.html | 1 - debug/tests/popupcontextmenuclicks.html | 1 - debug/tests/remove_while_dragging.html | 1 - debug/tests/removetilewhilepan.html | 1 - debug/tests/reuse_popups.html | 1 - debug/tests/rtl.html | 1 - debug/tests/rtl2.html | 1 - debug/tests/set_icon_reuse_dom.html | 1 - debug/tests/svg_clicks.html | 1 - debug/tests/tile-bounds.html | 1 - debug/tests/tile-events.html | 1 - debug/tests/tile-opacity.html | 1 - debug/tests/touch-shake.html | 1 - debug/tests/touch-zoom-bounce.html | 1 - debug/vector/bounds-extend.html | 1 - debug/vector/feature-group-bounds.html | 1 - debug/vector/geojson.html | 1 - debug/vector/moving-canvas.html | 1 - debug/vector/rectangle.html | 1 - debug/vector/touchzoomemu.html | 1 - debug/vector/vector-bounds.html | 1 - debug/vector/vector-canvas.html | 1 - debug/vector/vector-mobile.html | 1 - debug/vector/vector-simple.html | 1 - debug/vector/vector.html | 1 - debug/vector/vector2.html | 1 - 70 files changed, 82 insertions(+), 91 deletions(-) diff --git a/build/rollup-watch-config.js b/build/rollup-watch-config.js index aab3ba11e..5f99ea41c 100644 --- a/build/rollup-watch-config.js +++ b/build/rollup-watch-config.js @@ -34,7 +34,7 @@ export default { moduleName: 'L', banner: warningCode, entry: 'src/Leaflet.js', - dest: 'debug/leaflet-rollup-src.js', + dest: 'dist/leaflet-src.js', plugins: [ rollupGitVersion() ], diff --git a/debug/hacks/jitter.html b/debug/hacks/jitter.html index c34224012..09be27deb 100644 --- a/debug/hacks/jitter.html +++ b/debug/hacks/jitter.html @@ -8,7 +8,6 @@ - diff --git a/debug/leaflet-include.js b/debug/leaflet-include.js index 8681426b7..23dfb1d9b 120000 --- a/debug/leaflet-include.js +++ b/debug/leaflet-include.js @@ -1 +1 @@ -leaflet-rollup-src.js \ No newline at end of file +../dist/leaflet-src.js \ No newline at end of file diff --git a/debug/map/canvas.html b/debug/map/canvas.html index 3dd464fc0..9234b356c 100644 --- a/debug/map/canvas.html +++ b/debug/map/canvas.html @@ -7,7 +7,6 @@ - diff --git a/debug/map/control-layers.html b/debug/map/control-layers.html index b11e88f37..3ca2e0d9d 100644 --- a/debug/map/control-layers.html +++ b/debug/map/control-layers.html @@ -7,7 +7,6 @@ - diff --git a/debug/map/controls.html b/debug/map/controls.html index c0f8de082..78961bf0e 100644 --- a/debug/map/controls.html +++ b/debug/map/controls.html @@ -7,7 +7,6 @@ - diff --git a/debug/map/geolocation.html b/debug/map/geolocation.html index 7a69f8357..27ce38048 100644 --- a/debug/map/geolocation.html +++ b/debug/map/geolocation.html @@ -8,7 +8,6 @@ - diff --git a/debug/map/grid.html b/debug/map/grid.html index 7df7d6e73..11f4b6005 100644 --- a/debug/map/grid.html +++ b/debug/map/grid.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/image-overlay.html b/debug/map/image-overlay.html index c25c88d7b..c3b6d440d 100644 --- a/debug/map/image-overlay.html +++ b/debug/map/image-overlay.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/layer_remove_add.html b/debug/map/layer_remove_add.html index 0e2c81a85..ce7734e27 100644 --- a/debug/map/layer_remove_add.html +++ b/debug/map/layer_remove_add.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/map-mobile.html b/debug/map/map-mobile.html index 1a9354cec..e7a4e4fa8 100644 --- a/debug/map/map-mobile.html +++ b/debug/map/map-mobile.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/map-popup.html b/debug/map/map-popup.html index 1ea588fa1..f1d33257c 100644 --- a/debug/map/map-popup.html +++ b/debug/map/map-popup.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/map.html b/debug/map/map.html index f8e1e23ac..1822709af 100644 --- a/debug/map/map.html +++ b/debug/map/map.html @@ -9,7 +9,6 @@ - @@ -29,9 +28,21 @@ var markers = new L.FeatureGroup(); + function getRandomLatLng(llbounds) { + var s = llbounds.getSouth(), + n = llbounds.getNorth(), + w = llbounds.getWest(), + e = llbounds.getEast(); + + return L.latLng( + s + (Math.random() * (n - s)), + w + (Math.random() * (e - w)) + ) + } + function populate() { for (var i = 0; i < 10; i++) { - L.marker(getRandomLatLng(map)).addTo(markers); + L.marker(getRandomLatLng(map.getBounds())).addTo(markers); } return false; } diff --git a/debug/map/markers.html b/debug/map/markers.html index d78e03bf7..07bf9d5a2 100644 --- a/debug/map/markers.html +++ b/debug/map/markers.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/max-bounds-bouncy.html b/debug/map/max-bounds-bouncy.html index be9fe204f..464c4cf6e 100644 --- a/debug/map/max-bounds-bouncy.html +++ b/debug/map/max-bounds-bouncy.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/max-bounds-infinite.html b/debug/map/max-bounds-infinite.html index a4641254b..01ca04fc2 100644 --- a/debug/map/max-bounds-infinite.html +++ b/debug/map/max-bounds-infinite.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/max-bounds.html b/debug/map/max-bounds.html index 130f83ded..4e4e6fae1 100644 --- a/debug/map/max-bounds.html +++ b/debug/map/max-bounds.html @@ -9,7 +9,6 @@ - diff --git a/debug/map/opacity.html b/debug/map/opacity.html index b75f24f62..fdeb56f2e 100644 --- a/debug/map/opacity.html +++ b/debug/map/opacity.html @@ -9,7 +9,6 @@ - - diff --git a/debug/map/tile-opacity.html b/debug/map/tile-opacity.html index 22294223b..5ddf63642 100644 --- a/debug/map/tile-opacity.html +++ b/debug/map/tile-opacity.html @@ -7,7 +7,6 @@ - diff --git a/debug/map/tooltip.html b/debug/map/tooltip.html index d09506c73..a1c3ed535 100644 --- a/debug/map/tooltip.html +++ b/debug/map/tooltip.html @@ -7,7 +7,6 @@ - - diff --git a/debug/tests/add_remove_layers.html b/debug/tests/add_remove_layers.html index e3a03e50a..df20a0aab 100644 --- a/debug/tests/add_remove_layers.html +++ b/debug/tests/add_remove_layers.html @@ -9,7 +9,6 @@ - diff --git a/debug/tests/bringtoback.html b/debug/tests/bringtoback.html index c37306c54..e6460255a 100644 --- a/debug/tests/bringtoback.html +++ b/debug/tests/bringtoback.html @@ -8,7 +8,6 @@ - diff --git a/debug/tests/canvasloop.html b/debug/tests/canvasloop.html index 6b3292053..76e873e50 100644 --- a/debug/tests/canvasloop.html +++ b/debug/tests/canvasloop.html @@ -3,7 +3,6 @@ - diff --git a/debug/tests/click_on_canvas.html b/debug/tests/click_on_canvas.html index 3f0749aa9..e63d1fdd8 100644 --- a/debug/tests/click_on_canvas.html +++ b/debug/tests/click_on_canvas.html @@ -9,7 +9,6 @@ - diff --git a/debug/tests/custom-panes.html b/debug/tests/custom-panes.html index 6c5464f26..ab5287b81 100644 --- a/debug/tests/custom-panes.html +++ b/debug/tests/custom-panes.html @@ -9,7 +9,6 @@ - - diff --git a/debug/tests/opacity.html b/debug/tests/opacity.html index 4c199a2d3..75f66b6bf 100644 --- a/debug/tests/opacity.html +++ b/debug/tests/opacity.html @@ -14,7 +14,6 @@ } - diff --git a/debug/tests/popup_offset.html b/debug/tests/popup_offset.html index 4e6253cda..3a86d08c2 100644 --- a/debug/tests/popup_offset.html +++ b/debug/tests/popup_offset.html @@ -9,7 +9,6 @@ - diff --git a/debug/tests/popupcontextmenuclicks.html b/debug/tests/popupcontextmenuclicks.html index f6fe3cc38..49b72ca5a 100644 --- a/debug/tests/popupcontextmenuclicks.html +++ b/debug/tests/popupcontextmenuclicks.html @@ -9,7 +9,6 @@ - diff --git a/debug/tests/remove_while_dragging.html b/debug/tests/remove_while_dragging.html index 9b21fff26..6539738e3 100644 --- a/debug/tests/remove_while_dragging.html +++ b/debug/tests/remove_while_dragging.html @@ -7,7 +7,6 @@ - diff --git a/debug/tests/removetilewhilepan.html b/debug/tests/removetilewhilepan.html index ed2f04645..8475b0fff 100644 --- a/debug/tests/removetilewhilepan.html +++ b/debug/tests/removetilewhilepan.html @@ -8,7 +8,6 @@ - diff --git a/debug/tests/reuse_popups.html b/debug/tests/reuse_popups.html index a9c03b3f2..61a8219b2 100644 --- a/debug/tests/reuse_popups.html +++ b/debug/tests/reuse_popups.html @@ -6,7 +6,6 @@ - diff --git a/debug/tests/rtl.html b/debug/tests/rtl.html index e5962a73e..be707200d 100644 --- a/debug/tests/rtl.html +++ b/debug/tests/rtl.html @@ -9,7 +9,6 @@ - diff --git a/debug/tests/touch-shake.html b/debug/tests/touch-shake.html index 1e2ee994d..7ecdf14d4 100644 --- a/debug/tests/touch-shake.html +++ b/debug/tests/touch-shake.html @@ -11,7 +11,6 @@ - diff --git a/debug/tests/touch-zoom-bounce.html b/debug/tests/touch-zoom-bounce.html index 44e5f25e3..201cb54d5 100644 --- a/debug/tests/touch-zoom-bounce.html +++ b/debug/tests/touch-zoom-bounce.html @@ -11,7 +11,6 @@ - diff --git a/debug/vector/bounds-extend.html b/debug/vector/bounds-extend.html index 41dde4255..b4289542e 100644 --- a/debug/vector/bounds-extend.html +++ b/debug/vector/bounds-extend.html @@ -7,7 +7,6 @@ - diff --git a/debug/vector/feature-group-bounds.html b/debug/vector/feature-group-bounds.html index b38903c95..092248558 100644 --- a/debug/vector/feature-group-bounds.html +++ b/debug/vector/feature-group-bounds.html @@ -7,7 +7,6 @@ - diff --git a/debug/vector/geojson.html b/debug/vector/geojson.html index e32b1e1fa..2e86277f8 100644 --- a/debug/vector/geojson.html +++ b/debug/vector/geojson.html @@ -40,7 +40,6 @@ } - diff --git a/debug/vector/moving-canvas.html b/debug/vector/moving-canvas.html index fb3a4cec4..56170f426 100644 --- a/debug/vector/moving-canvas.html +++ b/debug/vector/moving-canvas.html @@ -9,7 +9,6 @@ - diff --git a/debug/vector/rectangle.html b/debug/vector/rectangle.html index b3b9045ca..9dd04f581 100644 --- a/debug/vector/rectangle.html +++ b/debug/vector/rectangle.html @@ -7,7 +7,6 @@ - diff --git a/debug/vector/touchzoomemu.html b/debug/vector/touchzoomemu.html index b8dd4a73c..76b8e4428 100644 --- a/debug/vector/touchzoomemu.html +++ b/debug/vector/touchzoomemu.html @@ -7,7 +7,6 @@ - diff --git a/debug/vector/vector-bounds.html b/debug/vector/vector-bounds.html index 2834ec12b..8217a8af6 100644 --- a/debug/vector/vector-bounds.html +++ b/debug/vector/vector-bounds.html @@ -7,7 +7,6 @@ - diff --git a/debug/vector/vector-canvas.html b/debug/vector/vector-canvas.html index 36c051b65..7e58097c3 100644 --- a/debug/vector/vector-canvas.html +++ b/debug/vector/vector-canvas.html @@ -7,7 +7,6 @@ - diff --git a/debug/vector/vector-mobile.html b/debug/vector/vector-mobile.html index d743e4e5e..54d45ae1d 100644 --- a/debug/vector/vector-mobile.html +++ b/debug/vector/vector-mobile.html @@ -9,7 +9,6 @@ - diff --git a/debug/vector/vector-simple.html b/debug/vector/vector-simple.html index 413ed68d7..1eda9a821 100644 --- a/debug/vector/vector-simple.html +++ b/debug/vector/vector-simple.html @@ -9,7 +9,6 @@ - diff --git a/debug/vector/vector.html b/debug/vector/vector.html index 65181917d..333d57973 100644 --- a/debug/vector/vector.html +++ b/debug/vector/vector.html @@ -6,7 +6,6 @@ - diff --git a/debug/vector/vector2.html b/debug/vector/vector2.html index 029f2fb09..e8ee33849 100644 --- a/debug/vector/vector2.html +++ b/debug/vector/vector2.html @@ -6,7 +6,6 @@ -
Enter Move Exit Click