some more tweaks

This commit is contained in:
Chris Kruining 2024-10-17 07:38:51 +02:00
parent d000b85429
commit fb4d28b265
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
3 changed files with 11 additions and 3 deletions

View file

@ -240,6 +240,7 @@ export const selectable = (element: HTMLElement, options: Accessor<{ value: obje
const mode = (() => {
if (append) return SelectionMode.Append;
if (!withRange && isSelected()) return SelectionMode.Toggle;
if (withRange) return SelectionMode.Replace;
return SelectionMode.Normal;
})();