mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Flash the "change feature type" button in the inspector whenever the preset changes (close #6764)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user