atlas-viewer / atlas

Main repository for Atlas viewer
https://atlas-viewer-storybook.netlify.app/
MIT License
5 stars 3 forks source link

adjust touch logic for non-interactive images #55

Closed abrin closed 3 weeks ago

abrin commented 1 month ago

CanvasPanel can use a static-preset, but set interactive to false. This works ok in many cases, but falls down in a few. This allows us to adjust the interactivity from the css level by moving the pointer-events logic into it’s own css class that’s assigned based on the interactive prop

codesandbox-ci[bot] commented 1 month ago

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.

bulbil commented 1 month ago

This makes a lot of sense to me, being a bit more selective of where pointer-events: none gets applied.

I noticed that .atlas-static-image also has pointer-events: none-- I was thinking that ought to be removed as well

stephenwf commented 1 month ago

One thing to test might be the box-resizing on the homepage annotations story. I think that uses interactive at the overlay level.

Changes look good, I think I've confused things by using the word interactive to mean two different things in two different contexts! (Is the canvas interactive, is the HTML painted on the canvas interactive). I will try to get this pulled down later this week and test with some of the annotation stuff.

abrin commented 1 month ago

One thing to test might be the box-resizing on the homepage annotations story. I think that uses interactive at the overlay level.

Changes look good, I think I've confused things by using the word interactive to mean two different things in two different contexts! (Is the canvas interactive, is the HTML painted on the canvas interactive). I will try to get this pulled down later this week and test with some of the annotation stuff.

@stephenwf So... the homepage renderer story gets at the core of the question, good point -- should we assume that if the static-preset preset is set at all that we should not enable any interactions? Or, does the interactive property that can be set on the renderer govern this?

stephenwf commented 3 weeks ago

I think the changes to the static preset (from the storybook) are fine. I don't know of any uses of the static preset + annotations. Are you happy for me to merge and release?

abrin commented 3 weeks ago

Hi Stephen, yes please & thank you!

stephenwf commented 3 weeks ago

v2.2.8 should be published in a few minutes 👍