Comment popover placed far from marker when zoomed out #32
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#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
When the canvas is zoomed out, clicking a comment marker opens the popover far from the marker (near the top-left of the board instead of next to the circle).
Root cause:
positionPopoverincomments.jsreadsmarker.getAbsolutePosition()— which already accounts for the stage transform and returns stage-container-relative pixel coordinates — and then multiplies bystage.scaleX()and addsstage.x()on top. The stage transform is counted twice. At scale < 1 the error is large enough that the popover lands near the canvas origin.Fix: drop the extra
* scale + stage.x()/* scale + stage.y()terms and usestageBox.left + markerPos.x/stageBox.top + markerPos.ydirectly.Pull request opened: #35