Skip to content

CODAP-1099: Fix point dragging in multi-y-attribute scatterplots#2334

Closed
bfinzer wants to merge 1 commit intomainfrom
CODAP-1099-multi-y-attr-drag-fix
Closed

CODAP-1099: Fix point dragging in multi-y-attribute scatterplots#2334
bfinzer wants to merge 1 commit intomainfrom
CODAP-1099-multi-y-attr-drag-fix

Conversation

@bfinzer
Copy link
Contributor

@bfinzer bfinzer commented Feb 2, 2026

Summary

  • Fix bug where dragging points in scatterplots with multiple y-attributes caused them to jump to wrong positions
  • Pass plotNum to getScreenY in refreshPointPositionsPerfMode so points use their correct y-attribute values during drag operations

Details

When dragging points in performance mode (active during drag), getScreenY was called without the plotNum parameter, defaulting to 0. This caused all points to be positioned using the first y-attribute's values, making points from other y-attributes jump to incorrect positions at the start of a drag.

Fixes CODAP-1099

Test plan

  • Open a document with a scatterplot containing 2 y-attributes
  • Drag a point from the second y-attribute (e.g., a purple point)
  • Verify the point moves smoothly from its start position without jumping

Pass plotNum to getScreenY in refreshPointPositionsPerfMode so that
points are positioned using their correct y-attribute values during
drag operations, rather than always using the first y-attribute.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bfinzer bfinzer requested a review from kswenson February 2, 2026 22:42
@kswenson
Copy link
Member

kswenson commented Feb 5, 2026

Closing this PR as the fix is already in main.

The change in this PR (commit c0e074b) is identical to commit 574866d which was merged to main on Jan 30:

This PR:

- const y = getScreenY(caseId)
+ const y = getScreenY(caseId, aCaseData.plotNum)

Already in main (574866d):

- const y = getScreenY(caseId)
+ const y = getScreenY(caseId, aCaseData.plotNum)

Both fix the same issue where points in scatter plots with multiple Y attributes were collapsing to incorrect positions during drag operations because getScreenY wasn't receiving the plotNum parameter.

@kswenson kswenson closed this Feb 5, 2026
@kswenson kswenson removed their request for review February 5, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants