mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
feat(hierarchy tree): animate on update
This commit is contained in:
parent
e3ea5cd479
commit
434907fa9e
7 changed files with 106 additions and 29 deletions
|
|
@ -293,7 +293,7 @@ function getShapeOptions(selectShape, selected) {
|
|||
return `<select data-tip="Emblem shape associated with culture. Click to change" class="cultureEmblems hide">${options}</select>`;
|
||||
}
|
||||
|
||||
function cultureHighlightOn(event) {
|
||||
const cultureHighlightOn = debounce(event => {
|
||||
const cultureId = Number(event.id || event.target.dataset.id);
|
||||
|
||||
if (!layerIsOn("toggleCultures")) return;
|
||||
|
|
@ -312,7 +312,7 @@ function cultureHighlightOn(event) {
|
|||
.transition(animate)
|
||||
.attr("r", 8)
|
||||
.attr("stroke", "#d0240f");
|
||||
}
|
||||
}, 200);
|
||||
|
||||
function cultureHighlightOff(event) {
|
||||
const cultureId = Number(event.id || event.target.dataset.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue