* fix(editor): align constant freedraw stroke width more with generic shapes
* reduce streamline for non-mouse
* do not change `currentItemStrokeVariability` unintentionally
* render penMode button under compact styles panel on tablets
* show stroke variability as standalone button in compact actions menu
* improve toolbar clicking UX with pen
* change streamline defaults
* change to `variable` stroke if toggling penMode for the first time
* fix(editor): elements duplicated when moving frame children
* fix(editor): accumulate reorders across frames in bring-to-front/back
* add invalid-order tests
* fix: make sure moved indices are within range
* add length/duplicate elements guards
* fix: Group selection
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Frames and overlap
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Remove unnecessary crust
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* revert unused Set signature
* skip ignored elements from group condition
when wrap-mode selecting grouped elements, we should not require to select those we ignore (bound elements or locked ones), else it's impossible to select grouped text containers
unclear whether locked elements should also be excluded - but it feels like a good heuristic on the whole
* apply exclusion
* simplify
* feat: return all elements in group for overlap selection
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
- Vendored fractional-indexing and converted to TypeScript
- Stricter index format validation in fractional-indexing
- Added format validation to fractional index validation
---
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* fix: Make OOB not fatal
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: More conservative temp arrow state update
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Capture condition variables in binding restoration failure
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Reinforce fixedPoint restore
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Even more hardened boundElement in restore
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Extract constant
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Remove superfluous check from restore
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove non-needed code path
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: More robust number test for fixedPoint parsing
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Validate bindings for element being parsed
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* unrelated type safety
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* fix(arrow): Overlap arrow behavior
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Lint
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat(editor): reduce binding gap (#10739)
* feat(editor): reduce binding gap to 7px
* feat(editor): reduce binding gap to 5px
* feat(editor): reduce binding gap to 3px
* go back to 5px
* update tests
* feat: Simplified update bind points
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Remove non-needed export
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix. Possessed arrows #1
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Focus point projection stabilization
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Remove arrow stability hack
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Unbound other endpoint
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat(editor): visualize binding midpoints + support for simple arrows (#10611)
* feat: Force exact center focus point
When the projected point is close to center snap it to the exact center.
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Snap to center around side mid point.
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* Trigger CI
* fix: Midpoint outline focus point
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Dragging existing arrow reset focus point on outline
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Midpoint indicator
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Rotated mid points
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: No hole
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Cache hits and scene lookups
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove debug
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Consider hit threshold and inside override too
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Increase outline midpoint sticky distance
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Don't show midpoint indicator when no snapping is possible
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Indicate lock-in
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove Map caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: incorrect threshold
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: threshold setting
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Hit caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Simple arrow mid point selection inconsistency
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: cache override
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Precise know dragging with midpoint refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fear: Frame support
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Crossing arrow won't trigger mid point
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Arrow creation point highlight
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Restore types & tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Restore restore.ts
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: restore.ts
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Elbow arrows reliably highlight center point
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Highlight point ordering
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Bind with focus point across shape
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Lint
* fix: Midpoint and binding alignment
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Indicator color
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: More knob tuning
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Radius
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* simplify point indicators
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Snapshots
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Target point selection
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove non-needed change
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Try again removing non-needed modification
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Inside-inside binding arrow endpoint drag trigger focus point editor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Area based edge case
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Overlapping new arrow jump
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
* feat: Force exact center focus point
When the projected point is close to center snap it to the exact center.
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Snap to center around side mid point.
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* Trigger CI
* fix: Midpoint outline focus point
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Dragging existing arrow reset focus point on outline
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Midpoint indicator
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Rotated mid points
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: No hole
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Cache hits and scene lookups
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove debug
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Consider hit threshold and inside override too
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Increase outline midpoint sticky distance
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Don't show midpoint indicator when no snapping is possible
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Indicate lock-in
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove Map caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: incorrect threshold
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: threshold setting
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Hit caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Simple arrow mid point selection inconsistency
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: cache override
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Precise know dragging with midpoint refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fear: Frame support
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Crossing arrow won't trigger mid point
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Arrow creation point highlight
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Restore types & tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Restore restore.ts
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: restore.ts
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Elbow arrows reliably highlight center point
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Highlight point ordering
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Bind with focus point across shape
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Lint
* fix: Midpoint and binding alignment
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Indicator color
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: More knob tuning
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Radius
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* simplify point indicators
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* fix: Arrow update when cloned
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat(editor): reduce binding gap (#10739)
* feat(editor): reduce binding gap to 7px
* feat(editor): reduce binding gap to 5px
* feat(editor): reduce binding gap to 3px
* go back to 5px
* update tests
* chore: Refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Align focus points
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
* fix: Other binding converted from fixed to orbit unconditionally
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: New arrow creation
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Alt point setting on inside binding
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Initial arrow creation with Alt
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat(editor): reduce binding gap to 7px
* feat(editor): reduce binding gap to 5px
* feat(editor): reduce binding gap to 3px
* go back to 5px
* update tests
* feat: Focus indicator
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Snapshot update
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Move visualdebug to utils and introduce volume bindable volume visualization
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Move visualdebug to elements
Due to dep circles
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Possible test timeout
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Incorrect hit test point input
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Add fallback when dragged outside of allowed area
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Elbow arrows don't need focus point mgmt
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: End bound indirect fix
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Show indicator when arrow endpoint dragging
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Update bound arrow endpoint at mid-point drag
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Curve endpoint intersection
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Outline focus point is reset on existing arrow drag
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Fix lint
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Dragging focus point off
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Don't show the focus indicator when arrow endpoint is dragged
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Drag area for focus handles
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Focus point size unified
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Size bump for focus knob
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Cache hits and scene lookups
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove debug
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Consider hit threshold and inside override too
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Other shape switching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* perf: Update tolerance params
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Focus know line width
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: knob offset
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Full overlap
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove Map caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: incorrect threshold
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: threshold setting
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Hit caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: cache override
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Snapshots
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Redesigned focus point handling
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Inside-inside mode
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* chore: Remove comment
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* feat: Allow focus knob outside the shape
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Arrow endpoint offset
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Focus knob element distance
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Increase iteration on curve intersection calc
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Handle disabled binding
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Alt mode
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Nested shape focus rewrite
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Alt + Ctrl + arrow endpoitn
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Hit ordering for focus points
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Focus point visibility
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* dry out renderFocusPointIndicator
* do not higlight point when dragging & make focus point smaller
* optimize retrieval of selectedLinearElement
* move focus highlighting into renderFocusPointIndicator to DRY out and colocate
* remove `disabled` state from focus highlight
* make focus point stroke color less prominent
* fix: No focus point for multi-point arrows
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Arrow edit mode drag focus point release
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* DRY out arrow point-like drag
* move `focus.ts` to `arrows/focus.ts`
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* feat: Move visualdebug to utils and introduce volume bindable volume visualization
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: Move visualdebug to elements
Due to dep circles
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
* fix: add constants and side methods to packages
* add transform to the element package
* lint
* remove dead code
* put transform types back to transform.ts
* fix imports
* fix imports in test
---------
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>