try different vector overdraw amounts for different setups
- canvas - overheads directly related to the number of drawn items, so limited overdraw - svg desktop - can handle large amounts of overdraw ok, so allow 100%, so known items don't vanish during most map panning - svg mobile - mobile struggles more, so limit svg overdraw
This commit is contained in:
parent
8434639be7
commit
69f3fb211b
13
code/boot.js
13
code/boot.js
@ -155,6 +155,19 @@ window.setupMap = function() {
|
||||
bounceAtZoomLimits: false
|
||||
});
|
||||
|
||||
if (L.Path.CANVAS) {
|
||||
// for canvas, 2% overdraw only - to help performance
|
||||
L.Path.CLIP_PADDING = 0.02;
|
||||
} else if (L.Path.SVG) {
|
||||
if (L.Browser.mobile) {
|
||||
// mobile SVG - 10% ovredraw. might help performance?
|
||||
L.Path.CLIP_PADDING = 0.1;
|
||||
} else {
|
||||
// for svg, 100% overdraw - so we have a full screen worth in all directions
|
||||
L.Path.CLIP_PADDING = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
// add empty div to leaflet control areas - to force other leaflet controls to move around IITC UI elements
|
||||
// TODO? move the actual IITC DOM into the leaflet control areas, so dummy <div>s aren't needed
|
||||
if(!isSmartphone()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user