universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

Fix #955

Open nicolasfranck opened this issue 1 year ago • 4 comments

Fixes #955

As noted in the issue, I do not know if this breaks other stuff, i.e. data that is not shown in openseadragon.

nicolasfranck avatar Mar 15 '24 10:03 nicolasfranck

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

codesandbox[bot] avatar Mar 15 '24 10:03 codesandbox[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universalviewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 10:04am

vercel[bot] avatar Mar 15 '24 10:03 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codesandbox-ci[bot] avatar Mar 15 '24 10:03 codesandbox-ci[bot]

Thanks, @nicolasfranck. I see that selectCurrentTreeNode() contains a 4-year-old TODO comment which implies that the eventual plan was to eliminate the need for two separate select methods entirely... so if that refactoring eventually occurs, your proposed change would need to be undone. But if it's fixing problems in the meantime, it seems relatively harmless, given that it's updating the tree node using the appropriate method for the event that caused the tree node to change initially. However, I see that there are several other calls to selectCurrentTreeNode in other parts of the file, and I'm not sure if these might still have bugs related to ranges. If they do, those bugs might be harder to fix.

In any case, bottom line: it seems unlikely to me that this fix makes things worse or causes new breakages, but I'm not sure if it fixes every problem related to the underlying problem. I'd love input from @edsilv if he has any memory of the context of this, but I'd be reasonably comfortable with approving and merging this fix if you need it resolved before Ed has a chance to respond. Feel free to follow up here if you need further action from my end.

demiankatz avatar Mar 15 '24 19:03 demiankatz