Skip to content

fix displayImage parameters in SampleImage#2037

Merged
marcus-oscarsson merged 1 commit intomxcube:developfrom
matyson:fix-display-image
Mar 4, 2026
Merged

fix displayImage parameters in SampleImage#2037
marcus-oscarsson merged 1 commit intomxcube:developfrom
matyson:fix-display-image

Conversation

@matyson
Copy link
Contributor

@matyson matyson commented Mar 3, 2026

Fixing displayImage call in SampleImage, this function expects two args to be sent separately and not a single string.

@matyson
Copy link
Contributor Author

matyson commented Mar 4, 2026

Also, this section of the code seems to return undefined values and as far as i could investigate option.pointer does not have .offsetX and .offsetY so i thought maybe replace it with option.e but i still don't get the right indexes. Any ideas on how to fix it?

@marcus-oscarsson
Copy link
Member

Fixing displayImage call in SampleImage, this function expects two args to be sent separately and not a single string.

Thanks :)

@marcus-oscarsson
Copy link
Member

Also, this section of the code seems to return undefined values and as far as i could investigate option.pointer does not have .offsetX and .offsetY so i thought maybe replace it with option.e but i still don't get the right indexes. Any ideas on how to fix it?

Hm that call looks strange, I looks like the function getClickedCellIndex has this signature getClickedCell(gd, shapeGroup, e). So I think option.pointer should simply be e. Would that make sense ?

@matyson
Copy link
Contributor Author

matyson commented Mar 4, 2026

Hm that call looks strange, I looks like the function getClickedCellIndex has this signature getClickedCell(gd, shapeGroup, e). So I think option.pointer should simply be e. Would that make sense ?

Okay, i think i found the error, should be option.e and the indexes were inverted in countCells (though im not entirely sure because row and col names are getting me a bit confused, but now imgNum make sense here)

- input correct parameters
- fix indexes position on click
@matyson matyson force-pushed the fix-display-image branch from 52e765b to 3fd7de8 Compare March 4, 2026 13:19
@marcus-oscarsson marcus-oscarsson merged commit 7fa6c9d into mxcube:develop Mar 4, 2026
11 checks passed
@matyson matyson deleted the fix-display-image branch March 4, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants