h5p-image-hotspots
h5p-image-hotspots copied to clipboard
Feature Request: Allow more customization to hotspots (Already Completed)
Hi Guys,
I've already completed this feature request for my company and thought it'd be useful to share with the community.
User story:
As an author I want to be able to customize the icons used for the hotspots including the background color and color of the icon to suit varying background images.
I also want to be able to use letters or numbers (max 2 chars) to display on the hotspot if needed for example 10 or AB.
UX: Have a group that is default to collapsed containing all the options to avoid taking up too much room if the author just wants to use the default options. Icons can be changed from an icon selector similar to the color selector.
Accessibility: Will be improved as the color of the hotspots can now be suited based on the background image.
Technical solution: I created a new editor similar to the color selector (this can now be used in any other h5p content aswell) using https://codeb.it/fonticonpicker/. It is basically a text field that contains the fa-*** code from font awesome so can be applied to a css class to display the icon.
The icon-selector editor can be found here: https://github.com/lukemuller/h5p-editor-icon-selector
And the update to the h5p-image-hotspots content type here: https://github.com/lukemuller/h5p-image-hotspots-icon-customisation
Thanks!
Sounds really good! Do you want us to consider to merge in the changes (and make your code part of the official MIT licensed Image Hotspots)?
Where are your modifications? They are probably there, I'm not that used to GitHub, but I can't find them :)
https://github.com/lukemuller/h5p-image-hotspots-icon-customisation/commits/master
@falcon-git Certainly, that would be great!
Whoops, looks like I forgot to push my changes. I've pushed the changes to that branch and they should be viewable now. I've also opened a pull request.
:)
I have had a quick look and it looks solid. Someone else from the Core Team will go through it in greater detail and hopefully merge it in for the Fulla release. (Not the one being worked on now, but the next)
Made this Jira issue for it. Thanks a lot for contributing!