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
This commit is contained in:
Bryan Housel
2018-08-10 22:19:40 -04:00
parent 68ed6b1024
commit fab4a54c14
2 changed files with 14 additions and 4 deletions
+7 -2
View File
@@ -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';
+7 -2
View File
@@ -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';