Hotspot editor #15242
Replies: 6 comments 7 replies
-
You're absolutely right @bjarnef — it's heavily based on the Focus point functionality from the Image Cropper that was current at the time. These days, depending on where you use it (in a Block Element, or a Tab, or a Group, or in a Group on a Tab on a Block Element for that matter) it can be a little finicky, though... |
Beta Was this translation helpful? Give feedback.
-
If this is something that should be added to core, I think it's relevant what kind of information that you should be able to provide for each spot. A name? What about a link? What if you in one case need a link, but not in another? So maybe if the information for each spot should be flexible, a new hotspot property editor should be based on the block list? This is however not easily doable. At least not as a third party package - I've tried creating a map editor like this, but ended up replace the entire block list view with my own. But if you just need a hotspot editor, I can see that having to create an element type for the hotspot, then create and configure a block list-style datatype, it get's a bit complex to set up. For a recent project, I ended up creating my own property editor (not based on the block list) for the hotspot since I did need to make it so that editors could specify a bit of extra information for each spot. |
Beta Was this translation helpful? Give feedback.
-
@abjerner as a start I think just the coordinate, which already exists in the focal point in Image Cropper.
we can just re-use this an wrap in a separate property editor without the crop and e.g. a prevalue property to select source image similar to source folder of uploads in Richtext property editor. A more advanced property editor may require a RFC, but the idea of Photon is that it used element type (or document type at that time) and thus possible to customize with additional properties. Basically it is much similar to blocks. But it think the Photon package was cool and I think @mattbrailsford had a POC using it as a route planner. |
Beta Was this translation helpful? Give feedback.
-
I made some initial work on this in #15254 re-using the |
Beta Was this translation helpful? Give feedback.
-
Alternatively it could also be a configuration of Image Cropper allowing it use hotspot on its own and without crops (the current backoffice store the data for focal point, but I am not sure it is is returned by PVC). But then the "Image Cropper" name doesn't really make much sense. The new backoffice could potentially allow "Image Cropper" extending the "Image with focal point" aka "Hotspot editor" and Image Cropper basically just added the additional cropping features. or a more complex editor allowing adding multiple focal points / hotspots eventually connected to an element type to add additonal data. |
Beta Was this translation helpful? Give feedback.
-
Interesting! I couldn't land the last piece of my hotspot editor. I have the media picker and the click and drag events setup for generating hotspots. The last piece was using the OOTB block list property editor with a custom config. The configuration works great (only set to one element type right now) but the data isn't stored. It's not as simple as:
2024-03-29.13-48-03.mp4 |
Beta Was this translation helpful? Give feedback.
-
From time to time we have had the need to create a hotspot on an (SVG) Image, e.g. a map of Denmark and coordinates (X, Y) for each location. It could eventually be more advanced like multiple hotspots or re-using element type like @mattbrailsford did a prototype of in Photon
@greystate also made a great package for an image hotspot and I think it re-use part of the logic what already exists in Image Cropper with a hotspot.
https://marketplace.umbraco.com/package/vokseverk.imagehotspot
Beta Was this translation helpful? Give feedback.
All reactions