trying to reset to get this pipe clear
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -163,9 +163,6 @@ var RoleSelect = (function () {
|
||||
var invSlot = document.getElementById("id_inv_role_card");
|
||||
if (invSlot) invSlot.innerHTML = "";
|
||||
|
||||
// Close tray so it doesn't obscure the next player's card-stack
|
||||
if (typeof Tray !== "undefined") Tray.close();
|
||||
|
||||
var stack = document.querySelector(".card-stack[data-user-slots]");
|
||||
if (stack) {
|
||||
// Sync starter-roles from server so the fan reflects actual DB state
|
||||
|
||||
@@ -176,6 +176,31 @@ var Tray = (function () {
|
||||
|
||||
function isOpen() { return _open; }
|
||||
|
||||
// forceClose() — instant, no animation. Used by server-driven events
|
||||
// (e.g. turn_changed) where the tray must be out of the way immediately.
|
||||
function forceClose() {
|
||||
_cancelPendingHide();
|
||||
_open = false;
|
||||
if (_btn) _btn.classList.remove('open');
|
||||
if (_wrap) _wrap.classList.remove('wobble', 'snap');
|
||||
if (_isLandscape()) {
|
||||
if (_wrap) {
|
||||
_wrap.classList.add('tray-dragging');
|
||||
_wrap.style.top = _maxTop + 'px';
|
||||
void _wrap.offsetWidth;
|
||||
_wrap.classList.remove('tray-dragging');
|
||||
}
|
||||
} else {
|
||||
if (_tray) _tray.style.display = 'none';
|
||||
if (_wrap) {
|
||||
_wrap.classList.add('tray-dragging');
|
||||
_wrap.style.left = _maxLeft + 'px';
|
||||
void _wrap.offsetWidth;
|
||||
_wrap.classList.remove('tray-dragging');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _snapWrap(onDone) {
|
||||
if (!_wrap) return;
|
||||
_wrap.classList.add('snap');
|
||||
@@ -416,11 +441,12 @@ var Tray = (function () {
|
||||
}
|
||||
|
||||
return {
|
||||
init: init,
|
||||
open: open,
|
||||
close: close,
|
||||
isOpen: isOpen,
|
||||
reset: reset,
|
||||
init: init,
|
||||
open: open,
|
||||
close: close,
|
||||
forceClose: forceClose,
|
||||
isOpen: isOpen,
|
||||
reset: reset,
|
||||
_testSetLandscape: function (v) { _landscapeOverride = v; },
|
||||
};
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user