fix(tools): expand transformer anchor hit area for easier grabbing #27
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_resize_anchor_hit_area"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes issue #21 — resize anchors were too small (8 px) and had a hit region matching the visual, so near-miss clicks selected the underlying object instead of starting a resize. Bumps the visible anchor size to 10 px (Konva default) and installs a padded
hitFuncon every anchor so the pickable area is ~22 x 22 px.Related Issue
Closes #21
Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/tools.jsanchorSize8 -> 10.applyAnchorHitPadding()helper that walks every._anchoron the transformer and sets ahitFuncdrawing a rect with 6 px padding on every side.transformevent and monkey-patchestransformer.nodesandtransformer.forceUpdateso padding survives anchor rebuilds triggered by selection changes or resize end.Test Results
cargo check --workspace: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passVanilla-JS change; needs manual verification in the browser.
Manual verification