diff --git a/code/boot.js b/code/boot.js index da7d59ae..5a6103d1 100644 --- a/code/boot.js +++ b/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
s aren't needed if(!isSmartphone()) {