Annotations Improvements / Issues #1882
Replies: 6 comments
-
@soraryu we integrated support for the As for the hotspots themselves, you can fully control the focus state with CSS. Eventually, we will have built-in default hotspots (for when you don't want to define your own hotspot elements) and those will have out-of-the-box support for the For now, my recommendation would be to implement the If you can't or don't want to add the model-viewer [slot^="hotspot"]:focus {
outline: none;
} |
Beta Was this translation helpful? Give feedback.
-
@soraryu Regarding your second point, we put pointer-events to auto since it seemed like people would want to interact with their hotspots. Are you having any trouble working around this with CSS? Changing the default is possible; I don't personally have a strong opinion one way or the other. |
Beta Was this translation helpful? Give feedback.
-
@soraryu to expand on @elalish 's point, if you want part of the hotspot (like that annotation) to be non-interactive, you can set CSS on it like: model-viewer [slot="hotspot-foo"] > * {
pointer-events: none;
} |
Beta Was this translation helpful? Give feedback.
-
I would very much want to be able to interact with them. However, there's a difference between drag and click - I think by default click should go to the hotspot while drag goes to model-viewer. Could that be configured with CSS as well? |
Beta Was this translation helpful? Give feedback.
-
Yah, this is probably something we should look into helping with. It is possible with CSS and JS, but hard to do right. So my thinking is that we could add the following:
I think most other things would probably be better handled with external CSS. |
Beta Was this translation helpful? Give feedback.
-
I filed #980 and #981 to cover those two items I mentioned above. @soraryu let me know if the |
Beta Was this translation helpful? Give feedback.
-
Description
Yes, I know this was just merged 2 hours ago in #917, and I'm super happy about it, so I want to feedback early :)
Would be great if the HTML focus outlines would not show by default, pretty confusing
(btw, same is true for the whole model-viewer component)
Annotation Boxes and Hotspots should be draggable by default
Current behaviour leads to user interaction interruptions when an element (hotspot or annotation box) happens to end up below the cursor.
Live Demo
https://modelviewer.dev/examples/annotations.html
Beta Was this translation helpful? Give feedback.
All reactions