mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix: correct recovery placement and quoted skin animations
This commit is contained in:
1 parent
9812a28e5f
commit
ae6788a796
7 files changed
+102
-1
No files matched your search
+19
-1
@@ -134,10 +134,28 @@ try {
|
||||
movesWhileHeld: moves.length - heldFrom,
|
||||
sinceFreezeMs: Math.round(performance.now() - pinnedAt),
|
||||
});
|
||||
|
||||
// A different screen must not inherit the old screen's exhausted freeze
|
||||
// escape or move history. Its microphone now occupies the parked spot.
|
||||
const frozenPosition = binding.position;
|
||||
document.getElementById("walls").remove();
|
||||
hopper.setAttribute("data-ws-part", "voice.audio-dock.microphone");
|
||||
chase(lib);
|
||||
const coveredBeforeScreenChange = coveredByLib(hopper);
|
||||
binding.screenChanged();
|
||||
await sleep(200);
|
||||
binding.revalidate();
|
||||
results.push({
|
||||
name: "screen-change-during-freeze",
|
||||
frozenPosition,
|
||||
position: binding.position,
|
||||
coveredBeforeScreenChange,
|
||||
microphoneCovered: coveredByLib(hopper),
|
||||
sinceFreezeMs: Math.round(performance.now() - pinnedAt),
|
||||
});
|
||||
binding.dispose();
|
||||
lib.remove();
|
||||
hopper.remove();
|
||||
document.getElementById("walls").remove();
|
||||
accompaniment.style.display = "";
|
||||
}
|
||||
|
||||
|
||||
+16
@@ -34,6 +34,8 @@ const CSS = `
|
||||
background: var(--ws-control-background, #fff);
|
||||
color: var(--ws-control-foreground, #31524f);
|
||||
}
|
||||
.cap[data-ws-float^="middle"] { bottom: auto; top: 50%; translate: 0 -50%; }
|
||||
.cap[data-ws-float$="center"] { left: 50%; translate: -50% 0; }
|
||||
.cap button { min-height: var(--ws-control-hit, 28px); padding: 0 8px; }
|
||||
`;
|
||||
try {
|
||||
@@ -80,6 +82,20 @@ try {
|
||||
const results = [];
|
||||
results.push(snap("initial"));
|
||||
|
||||
// A floating fallback may have moved to a centred position. Its CSS
|
||||
// translation must not offset the slot's fixed coordinates or hit test.
|
||||
for (const position of ["middle-left", "middle-right", "top-center", "bottom-center"]) {
|
||||
anchor.style.display = "none";
|
||||
binding.revalidate();
|
||||
control.dataset.wsFloat = position;
|
||||
results.push({ ...snap(`fallback-${position}`), translated: getComputedStyle(control).translate !== "none" });
|
||||
anchor.style.display = "";
|
||||
binding.revalidate();
|
||||
binding.revalidate();
|
||||
results.push({ ...snap(`redocked-${position}`), translate: getComputedStyle(control).translate });
|
||||
}
|
||||
delete control.dataset.wsFloat;
|
||||
|
||||
anchor.style.display = "none";
|
||||
binding.revalidate();
|
||||
results.push(snap("anchor-hidden"));
|
||||
|
||||
Reference in new issue
Block a user