fix: improve loras widget drag functionality in Vue DOM render mode

- Use pointer events (pointerdown/pointermove/pointerup/pointercancel) with proper capture
- Fix drag not updating strength values by avoiding re-renders during drag
- Fix cursor stuck in resize state by ensuring proper cleanup
- Fix cursor showing wrong icon on hover (should be pointer)
- Ensure strength values display fixed width with 2 decimal places
- Remove unnecessary data-capture-wheel attribute (no wheel adjustment in loras widget)
- Add font-variant-numeric: tabular-nums for consistent number display

This ensures loras widget works consistently in both Canvas and Vue DOM render modes.
This commit is contained in:
Will Miao
2026-01-15 15:57:48 +08:00
parent 5636437df2
commit bd4958edc3
4 changed files with 1200 additions and 1068 deletions

View File

@@ -107,6 +107,7 @@
margin-bottom: 5px;
position: relative;
cursor: ew-resize;
touch-action: none;
}
.lm-toggle-container {
@@ -155,6 +156,8 @@
margin-bottom: 4px;
border: 1px solid transparent;
background-color: rgba(45, 55, 72, 0.7);
touch-action: none;
cursor: pointer !important;
}
.lm-lora-entry[data-active="false"] {
@@ -486,6 +489,8 @@ body.lm-lora-reordering * {
align-items: center;
transition: all 0.2s ease;
margin-top: -2px;
touch-action: none;
cursor: pointer !important;
}
.lm-lora-clip-entry[data-active="false"] {