From fab4a54c149eee81d30506c965f40aa4562c0b15 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 10 Aug 2018 22:19:40 -0400 Subject: [PATCH] Redraw measurement and history panels on context mode enter - these panel content were redrawn whenever the map was redrawn, however the map does not necessarily redraw when selecting notes --- modules/ui/panels/history.js | 9 +++++++-- modules/ui/panels/measurement.js | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/ui/panels/history.js b/modules/ui/panels/history.js index e8e8fcdcf..249a2068e 100644 --- a/modules/ui/panels/history.js +++ b/modules/ui/panels/history.js @@ -227,11 +227,16 @@ export function uiPanelHistory(context) { .on('drawn.info-history', function() { selection.call(redraw); }); + + context + .on('enter.info-history', function() { + selection.call(redraw); + }); }; panel.off = function() { - context.map() - .on('drawn.info-history', null); + context.map().on('drawn.info-history', null); + context.on('enter.info-history', null); }; panel.id = 'history'; diff --git a/modules/ui/panels/measurement.js b/modules/ui/panels/measurement.js index b5400950b..aabdf7641 100644 --- a/modules/ui/panels/measurement.js +++ b/modules/ui/panels/measurement.js @@ -193,11 +193,16 @@ export function uiPanelMeasurement(context) { .on('drawn.info-measurement', function() { selection.call(redraw); }); + + context + .on('enter.info-measurement', function() { + selection.call(redraw); + }); }; panel.off = function() { - context.map() - .on('drawn.info-measurement', null); + context.map().on('drawn.info-measurement', null); + context.on('enter.info-measurement', null); }; panel.id = 'measurement';