Use clone for itemviewer trim
This commit is contained in:
@@ -80,7 +80,7 @@ addEventListener('resize', (_) => {
|
|||||||
})
|
})
|
||||||
addEventListener("scroll", (_) => {
|
addEventListener("scroll", (_) => {
|
||||||
refreshArrows()
|
refreshArrows()
|
||||||
});
|
})
|
||||||
|
|
||||||
function handleSubtreeMount(end : Element) {
|
function handleSubtreeMount(end : Element) {
|
||||||
drawArrow(start.value!!, end)
|
drawArrow(start.value!!, end)
|
||||||
|
|||||||
@@ -9,9 +9,14 @@ for(let item of items.value) {
|
|||||||
itemMap.set(item.id, item)
|
itemMap.set(item.id, item)
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => props.builds, () => trimBuilds(props.builds))
|
const builds = ref(JSON.parse(JSON.stringify(props.builds)))
|
||||||
trimBuilds(props.builds)
|
watch(() => props.builds, () => {
|
||||||
trimLateGameItems(props.builds)
|
builds.value = JSON.parse(JSON.stringify(props.builds))
|
||||||
|
trimBuilds(builds.value)
|
||||||
|
trimLateGameItems(builds.value)
|
||||||
|
})
|
||||||
|
trimBuilds(builds.value)
|
||||||
|
trimLateGameItems(builds.value)
|
||||||
|
|
||||||
function trimBuilds(builds : Builds) {
|
function trimBuilds(builds : Builds) {
|
||||||
builds.tree.children.splice(1, builds.tree.children.length - 1)
|
builds.tree.children.splice(1, builds.tree.children.length - 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user