Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

use window innerwidth

Ed Plato64ae418dedae
diff --git a/web/js/map/compare/swipe.js b/web/js/map/compare/swipe.js
index 6a1d36f59..f2674453e 100644
--- a/web/js/map/compare/swipe.js
+++ b/web/js/map/compare/swipe.js
@@ -153,7 +153,7 @@ const addLineOverlay = function(map, dateA, dateB) {
const draggerCircleEl = document.createElement('div');
const firstLabel = document.createElement('span');
const secondLabel = document.createElement('span');
- const windowWidth = util.browser.dimensions[0];
+ const windowWidth = window.innerWidth;
mapCase = map.getTargetElement();
draggerCircleEl.className = 'swipe-dragger-circle';
firstLabel.className = 'ab-swipe-span left-label';
@@ -223,7 +223,7 @@ const dragLine = function(listenerObj, lineCaseEl, map) {
dragging = true;
events.trigger('compare:movestart');
}
- const windowWidth = util.browser.dimensions[0];
+ const windowWidth = window.innerWidth;
if (listenerObj.type === 'default') evt.preventDefault();
evt.stopPropagation();