mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-26 11:18:02 +08:00
画两张地图
This commit is contained in:
1 parent
8faeeb9aca
commit
1e916be361
6 files changed
+100
-20
No files matched your search
+11
-2
@@ -87,7 +87,7 @@ async function calHeight() {
|
||||
if (core.plugin.fixedDetailOpened.value) {
|
||||
showFixed.value = false;
|
||||
}
|
||||
main = document.getElementById('enemy-fixed') as HTMLDivElement;
|
||||
updateMain();
|
||||
if (!main) return;
|
||||
const style = getComputedStyle(main);
|
||||
const h = parseFloat(style.height);
|
||||
@@ -106,10 +106,19 @@ function getLabel(attr: keyof DetailedEnemy) {
|
||||
return core.getStatusLabel(attr);
|
||||
}
|
||||
|
||||
function updateMain() {
|
||||
main = document.getElementById('enemy-fixed') as HTMLDivElement;
|
||||
if (main) {
|
||||
main.addEventListener('mouseleave', () => {
|
||||
showFixed.value = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onUpdated(calHeight);
|
||||
|
||||
onMounted(() => {
|
||||
main = document.getElementById('enemy-fixed') as HTMLDivElement;
|
||||
updateMain();
|
||||
calHeight();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user