Skip to content

Commit e503883

Browse files
authored
[fix] Set leaflet worldCopyJump to true by default #373
Fixes #373
1 parent 54c4997 commit e503883

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

public/example_templates/netjsonmap-indoormap.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
crs: L.CRS.Simple,
4949
// set map initial state.
5050
mapOptions: {
51+
// disable leaflet worldCopyJump on the indoor map
52+
// because it's incompatible (raises a JS error) and not needed
53+
worldCopyJump: false,
5154
center: [48.577, 18.539],
5255
zoom: 0,
5356
zoomSnap: 0.3,

src/js/netjsongraph.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ const NetJSONGraphDefaultConfig = {
165165
mapOptions: {
166166
roam: true,
167167
zoomAnimation: false,
168+
worldCopyJump: true,
168169
minZoom: 3,
169170
maxZoom: 18,
170171
nodeConfig: {

test/netjsongraph.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ describe("NetJSONGraph Specification", () => {
120120
const NetJSONGraphMapOptions = {
121121
roam: true,
122122
zoomAnimation: false,
123+
worldCopyJump: true,
123124
minZoom: 3,
124125
maxZoom: 18,
125126
nodeConfig: {

0 commit comments

Comments
 (0)