From 35c7cbd92bd24d21fffcf12494b62f0d8526a2f2 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 4 Apr 2019 17:34:20 -0700 Subject: [PATCH] Ensure that undo/redo buttons look disabled when the map is not editable (close #6105) --- modules/ui/tools/undo_redo.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ui/tools/undo_redo.js b/modules/ui/tools/undo_redo.js index 3e61b8767..51fdcd293 100644 --- a/modules/ui/tools/undo_redo.js +++ b/modules/ui/tools/undo_redo.js @@ -90,7 +90,9 @@ export function uiToolUndoRedo(context) { function update() { buttons .property('disabled', !editable()) - .classed('disabled', function(d) { return !d.annotation(); }) + .classed('disabled', function(d) { + return !editable() || !d.annotation(); + }) .each(function() { var selection = d3_select(this); if (selection.property('tooltipVisible')) {