fix(p15): remediate seven control-panel + knob defects
Greyer panel ground (token); remove drag scrollbar + lock body scroll; caption icons light; center WAVE slider; RadialKnob drag uses pointer events (robust to cursor leaving window); milder scrim alpha; overlay z-index above header/footer.
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
@using System.Globalization
|
||||
|
||||
<!-- Global mouse capture container when dragging -->
|
||||
<!-- Global pointer-capture container when dragging.
|
||||
position:fixed; inset:0; z-index:9999 so it sits above all overlays (the controls modal is z-index:1400).
|
||||
Pointer events used instead of mouse events: @onpointermove / @onpointerup fire even if the
|
||||
cursor moves outside the browser window when pointer capture is active (set on mousedown below).
|
||||
@onpointercancel covers the OS-level cancel path (e.g. Alt+Tab on Windows). Drag always ends cleanly. -->
|
||||
@if (_isDragging)
|
||||
{
|
||||
<div style="position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; cursor: ns-resize;"
|
||||
@onmousemove="@OnGlobalMouseMove" @onmouseup="@OnGlobalMouseUp">
|
||||
@onpointermove="@OnGlobalPointerMove"
|
||||
@onpointerup="@OnGlobalPointerUp"
|
||||
@onpointercancel="@OnGlobalPointerCancel">
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -156,19 +162,19 @@
|
||||
_lastMouseY = e.ClientY;
|
||||
_dragValue = Value; // Initialize drag value with current value
|
||||
|
||||
// Add global mouse event handlers using Blazor's event handling
|
||||
// The full-viewport capture div renders; pointer events on it will handle the rest.
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task OnGlobalMouseMove(MouseEventArgs e)
|
||||
private async Task OnGlobalPointerMove(PointerEventArgs e)
|
||||
{
|
||||
if (_isDragging)
|
||||
{
|
||||
await UpdateValueFromMouse(e);
|
||||
await UpdateValueFromPointer(e);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task OnGlobalMouseUp(MouseEventArgs e)
|
||||
private async Task OnGlobalPointerUp(PointerEventArgs e)
|
||||
{
|
||||
if (_isDragging && HoldValue)
|
||||
{
|
||||
@@ -183,9 +189,16 @@
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task UpdateValueFromMouse(MouseEventArgs e)
|
||||
// Pointer capture cancelled by OS (e.g. Alt+Tab, system gesture) — end drag cleanly.
|
||||
private async Task OnGlobalPointerCancel(PointerEventArgs e)
|
||||
{
|
||||
// Calculate vertical delta from last mouse position
|
||||
_isDragging = false;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task UpdateValueFromPointer(PointerEventArgs e)
|
||||
{
|
||||
// Calculate vertical delta from last pointer position
|
||||
double deltaY = _lastMouseY - e.ClientY; // Inverted: up = positive, down = negative
|
||||
_lastMouseY = e.ClientY;
|
||||
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
--deepdrft-scrim-rgb: 13, 27, 42;
|
||||
/* Modal scrim opacity — the SINGLE point of truth for the visualizer-controls overlay tint
|
||||
(Phase 15 §4/§10.5). Mild so the panel reads as modal without a blackout. Change here once. */
|
||||
--deepdrft-modal-scrim-alpha: 0.3;
|
||||
--deepdrft-modal-scrim-alpha: 0.15;
|
||||
/* Panel ground — desaturated from navy-mid toward charcoal so the blue slider stands out.
|
||||
Tunable: increase blue channel (e.g. #1e2235) to recover warmth, lower (e.g. #1a1d22) to go darker. */
|
||||
--deepdrft-panel-ground: #1e2028;
|
||||
|
||||
/* Wireframe font stack */
|
||||
--deepdrft-font-display: "Cormorant Garamond", Georgia, serif;
|
||||
|
||||
Reference in New Issue
Block a user