mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52: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
@@ -563,6 +563,14 @@ export function bindFloatingAvoidance(options: FloatingAvoidanceOptions): Floati
|
||||
function screenChanged() {
|
||||
if (disposed) return;
|
||||
for (const pending of screenTimers) clearTimeout(pending);
|
||||
if (confirmTimer) clearTimeout(confirmTimer);
|
||||
confirmTimer = undefined;
|
||||
// Freeze and move history belong to the old screen. Carrying them over
|
||||
// can strand the capsule on a newly mounted microphone or other control.
|
||||
frozenUntil = 0;
|
||||
frozenEscaped = false;
|
||||
moveTimes = [];
|
||||
lastMoveAt = Number.NEGATIVE_INFINITY;
|
||||
pendingSince = 0;
|
||||
urgentUntil = Date.now() + HOST_FLOATING_SCREEN_CHANGE_MS;
|
||||
screenTimers = HOST_FLOATING_SCREEN_CHANGE_SAMPLES_MS.map(delay => setTimeout(safeEvaluate, delay));
|
||||
|
||||
@@ -364,6 +364,7 @@ export function bindHostSlot(options: HostSlotBindingOptions): HostSlotBinding {
|
||||
control.style.removeProperty("top");
|
||||
control.style.removeProperty("right");
|
||||
control.style.removeProperty("bottom");
|
||||
control.style.removeProperty("translate");
|
||||
}
|
||||
|
||||
function applyPlacement(left: number, top: number): void {
|
||||
@@ -372,6 +373,9 @@ export function bindHostSlot(options: HostSlotBindingOptions): HostSlotBinding {
|
||||
control.style.top = `${top}px`;
|
||||
control.style.right = "auto";
|
||||
control.style.bottom = "auto";
|
||||
// Floating positions may centre the capsule with a percentage translate.
|
||||
// Slot coordinates already include alignment, including during hit tests.
|
||||
control.style.translate = "none";
|
||||
}
|
||||
|
||||
function hitTestAt(left: number, top: number, size: { width: number; height: number }): boolean {
|
||||
|
||||
Reference in new issue
Block a user