From 47b95d6739d8bfcb2ee285ffaaffc8fc41520f1f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 1 Nov 2020 18:44:31 -0800 Subject: Improve map switching --- modern/src/map/switcher/switcher.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modern/src/map/switcher') diff --git a/modern/src/map/switcher/switcher.js b/modern/src/map/switcher/switcher.js index ff9fbe9..c2b9d6d 100644 --- a/modern/src/map/switcher/switcher.js +++ b/modern/src/map/switcher/switcher.js @@ -32,9 +32,13 @@ export class SwitcherControl { if (srcElement.classList.contains('active')) { return; } + console.log('beforeSwitch start'); this.beforeSwitch(); + console.log('beforeSwitch end'); this.map.setStyle(JSON.parse(srcElement.dataset.uri)); + console.log('afterSwitch start'); this.afterSwitch(); + console.log('afterSwitch end'); this.mapStyleContainer.style.display = 'none'; this.styleButton.style.display = 'block'; const elms = this.mapStyleContainer.getElementsByClassName('active'); -- cgit v1.2.3