- Issue created by @thomas.frobieter
- Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
@thomas.frobieter please compare it to https://scaleflex.github.io/js-cloudimage-360-view/
The implementation and settings are very basic and simple via HTML attributes.
- 🇩🇪Germany Anybody Porta Westfalica
This is the element that should be shown:
<div class="cloudimage-360-view-360-icon" style="background: rgba(255, 255, 255, 0.8) url("https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/360_view.svg") 50% 50% / contain no-repeat;"></div>
Perhaps you can check in code, why it's not added or shown.
I had a look on the demo page: https://scaleflex.github.io/js-cloudimage-360-view/
Seems that this logo only appears if autoplay is turned off. Its kind of a "play button". So we should change the label & description of the setting then.
- Assigned to thomas.frobieter
- 🇩🇪Germany Anybody Porta Westfalica
Seems we should set logo-src and provide the file locally!
https://github.com/search?q=repo%3Ascaleflex%2Fjs-cloudimage-360-view%20...
@thomas.frobieter might also be something WE need to add in CSS?
Please read:
https://github.com/scaleflex/js-cloudimage-360-view/blob/39469ed58823ebe...Over and out.
Sure, we can simply place the logo in the module folder.
The CSS seems kind of dirty on the library side.. but sure, we could fix that.
@grevil We need to solve this together:
- @grevil: Set "logo-src" (not "data-logo-src") on the attributes (image path should be 'MODULE_PATH/images/360_view.svg'
- @grevil: Change the "Hide 360° logo" label to "Hide 360° logo (only on autoplay), or hide the setting with the States API if autoplay is disabled?
- @thomas.frobieter: Put the logo into an /images folder: https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/360_vi...
- @thomas.frobieter: Same for the SVG images in the CSS file: https://github.com/scaleflex/js-cloudimage-360-view/blob/39469ed58823ebe...
- @thomas.frobieter: Add a css file to js_cloudimage_360_view.libraries.yml and override the images defined in https://github.com/scaleflex/js-cloudimage-360-view/blob/39469ed58823ebe...
- 🇩🇪Germany Anybody Porta Westfalica
@grevil: Change the "Hide 360° logo" label to "Hide 360° logo (only on autoplay), or hide the setting with the States API if autoplay is disabled?
First one would be hard to understand, I'd vote to either hide it by states API or write a feature request to add a data-attribute in the library to also show the 360° logo if autoplay is enabled. From my perspective that would also make sense to be controllable.
@grevil these are the methods to use to get the frontend path to the module folder:
https://www.drupal.org/node/2940438 →$path = \Drupal::service('extension.list.module')->getPath('js_cloudimage_360_view') . '/images';
- Assigned to Grevil
I am done with my part, while I am not sure if we need any of the images except 360_view.svg?! Currently, there is no option to enable zoom or manage hotspots .. mhm.
And I have already added (src/Plugin/Field/FieldFormatter/Cloudimage360ViewFormatter.php):
// @todo add correct variables for the module path $attributes->setAttribute('logo-src', '/modules/contrib/js_cloudimage_360_view/images/360_view.svg');
Okay, so the images are used, but we currently miss some options to enable the controls etc: 📌 Add missing important options to the field formatter Fixed
@grevil Please reassign me to this issue once 📌 Add missing important options to the field formatter Fixed is fixed so I can check that all images are now served locally.
- First commit to issue fork.
- Merge request !4Issue #3474225 by thomas.frobieter, anybody: 360° Logo is not shown → (Merged) created by Grevil
- 🇩🇪Germany Grevil
@thomas.frobieter, lädt irgendwie noch nicht vernünftig:
Der URL Call sieht mir aber vernünftig aus (siehe https://developer.mozilla.org/en-US/docs/Web/CSS/url_function).
- Assigned to thomas.frobieter
- Status changed to Needs work
7 months ago 10:23am 19 September 2024 - 🇩🇪Germany Anybody Porta Westfalica
@Grevil: Also please implement
data-folder
:
https://github.com/Scaleflex/js-cloudimage-360-view#data-folder-or-folder - 🇩🇪Germany Grevil
No idea... "data-folder" doesn't seem to do anything... Let's see if thomas.frobieter has an idea.
- 🇩🇪Germany Anybody Porta Westfalica
Take a look at the sourcecode from their repo for further details, I'd say. Until that, keep it as-is (and is documented)
- 🇩🇪Germany Grevil
Yea still no idea. Our css overwrite doesn't seem to have any effect. All the icon styles (apart from the main 360 image) are still loaded from remote...
The library probably overwrites our css file itself.
data-folder
defines the src of the 360 jpgs and has nothing to do with the icon styles. - 🇩🇪Germany Anybody Porta Westfalica
@grevil I left some comments. Please also review.
- 🇩🇪Germany Grevil
Ok rebased the fork now, let's not merge anything else before this is fixed, as the conflicts are quite annoying.
- 🇩🇪Germany Grevil
Not a pro regarding css, but the css still contains the cdn url for me, or am I simply looking wrong? Looking at the header "style" section:
- 🇩🇪Germany Grevil
Also the formatter is broken entirely for me, but that could be due to shenanigans with @Anybody in core. Yea no idea, somebody more knowledgeable should agree and merge this (if the formatter still works, but parens::viewElements returns NULL for me, which sounds like some weird shenanigans).
Not a pro regarding css, but the css still contains the cdn url for me, or am I simply looking wrong? Looking at the header "style" section:
Sure, we can't remove this, we can only override it in our CSS file. If you look in the dev consoles network tab, you should not see any images loaded from the libs CDN.
Automatically closed - issue fixed for 2 weeks with no activity.