From 3b671bf4e45231b3fc6b5fc3e82426fa9343c5a9 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 3 Oct 2019 18:50:33 +0200 Subject: [PATCH] Flash the "change feature type" button in the inspector whenever the preset changes (close #6764) --- modules/ui/entity_editor.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/ui/entity_editor.js b/modules/ui/entity_editor.js index fd04d260f..876dc28b4 100644 --- a/modules/ui/entity_editor.js +++ b/modules/ui/entity_editor.js @@ -262,6 +262,16 @@ export function uiEntityEditor(context) { // Don't replace a weak preset with a fallback preset (e.g. "Point") if (!(weakPreset && match.isFallback())) { entityEditor.preset(match); + + if (match.id !== activePreset.id) { + // flash the button to indicate the preset changed + selection + .selectAll('button.preset-reset .label') + .style('background-color', '#fff') + .transition() + .duration(500) + .style('background-color', null); + } } entityEditor.modified(_base !== graph); entityEditor(selection);