Image Hotspots, using png files for hotspot
Submitted by studioka on Thu, 07/02/2020 - 21:29
Forums:
Hello
When I upload the png file, the background appears as white. Is there any solution for this? I want to make it invisible or completely invisible in a ring hotspot
example: https://h5p.org/node/942559
BV52
Fri, 07/03/2020 - 18:14
Permalink
Hi studioka, Have you tried
Hi studioka,
Have you tried using Find Multiple Hotspots? How does it differ from what you would like to achieve? As far as I know transparent images such as png does not work with H5P contents.
-BV
papi Jo
Tue, 07/14/2020 - 11:16
Permalink
Hi studioka,
Hi studioka,
The problem is not with using a png image for your hotspots. Transparent png images do work fine in H5P. The bug comes from the image-hotspots.css where we find this line:
.h5p-image-hotspot {
background: #fff;
Simply removing that background: #fff; line from the CSS solves your problem, as shown in my little animation attached.
jagan
Thu, 10/15/2020 - 08:29
Permalink
Where can we find this css file please?
Thank you very much for the solution.
Where can we find this css file please, thank you!
papi Jo
Thu, 10/15/2020 - 16:33
Permalink
Hi jagan,
Hi jagan,
You'll find that css file here: h5p\libraries\H5P.ImageHotspots-1.8\styles\image-hotspots.css
OT_FEAS
Wed, 08/04/2021 - 20:25
Permalink
Can you give some more
Can you give some more information on how to do this edit?
Panox
Tue, 02/08/2022 - 13:13
Permalink
Path in Lumi
I found the solution here:
C:\Users\Username\AppData\Roaming\lumi\libraries\H5P.IVHotspot-1.2\scripts\iv-hotspot.js
Search for "visuals" and edit with Notepad++ or another program to " backgroundColor: 'rgba(0, 0, 0, 0)'"
----------------------------------------------
visuals: {
shape: 'rectangular',
backgroundColor: 'rgba(0, 0, 0, 0)'
-----------------------------------------------
Set background of PNG to transparent.
The background will be white again if you edit the image e.g. by rotating.
otacke
Tue, 02/08/2022 - 18:12
Permalink
Hi!All you achieve by that is
Hi!
All you achieve by that is that files created locally on your machine will contain that change. On other platforms that you may upload that file to, H5P will use the original code from the original "H5P.IVHotspot 1.2".
Best,
Oliver
icenter university
Mon, 05/23/2022 - 22:56
Permalink
Where is this folder?
I don't appear to have a libraries folder as you do. Is there another place this file may exist?
papi Jo
Tue, 07/21/2020 - 23:57
Permalink
Hi studioka,
Hi studioka,
I hope you found my reply useful.
OT_FEAS
Wed, 08/04/2021 - 20:26
Permalink
Can you give more information
Can you give more information on how to do this edit?
icenter university
Mon, 05/23/2022 - 22:55
Permalink
I can't find this file, as
I can't find this file, as the Libraries folder does not exist. Any ideas?
papi Jo
Tue, 05/24/2022 - 18:03
Permalink
Which platform are you using
Which platform are you using H5P activities on? Wordpress, Moodle, Drupal, etc.?
icenter university
Tue, 05/24/2022 - 21:35
Permalink
My apologies, should have
My apologies, should have included that! We are using Moodle.
papi Jo
Tue, 05/24/2022 - 22:55
Permalink
Unfortunately in Moodle the
Unfortunately in Moodle the libraries folder is not accessible
icenter university
Tue, 05/24/2022 - 22:05
Permalink
Oh, we found it! We followed
Oh, we found it! We followed the steps found here https://moodle.org/mod/forum/discuss.php?d=365914
Thank you!
papi Jo
Wed, 05/25/2022 - 15:52
Permalink
Glad that you found a
Glad that you found a solution!