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
|
|
@ -258,7 +258,7 @@ function getTypeOptions(type) {
|
|||
return options;
|
||||
}
|
||||
|
||||
function religionHighlightOn(event) {
|
||||
const religionHighlightOn = debounce(event => {
|
||||
const religionId = Number(event.id || event.target.dataset.id);
|
||||
const $el = $body.querySelector(`div[data-id='${religionId}']`);
|
||||
if ($el) $el.classList.add("active");
|
||||
|
|
@ -280,7 +280,7 @@ function religionHighlightOn(event) {
|
|||
.attr("r", 8)
|
||||
.attr("stroke-width", 2)
|
||||
.attr("stroke", "#c13119");
|
||||
}
|
||||
}, 200);
|
||||
|
||||
function religionHighlightOff(event) {
|
||||
const religionId = Number(event.id || event.target.dataset.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue