Hi All,
Is it possible to change the colors of the SVG files with an action such as "on click"? I am doing all I can to keep the tour file sizes down so would like to simply change the color instead of creating additional graphics.
Thanks!
Change SVG Color Via Action?
- Hopki
- Gnome
- Posts: 13029
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
You can't dynamically change the colour of an SVG but if its file size and performance you're concerned about then did you know If a graphic is under 5K then it gets coded inline with the skin.js file.
This means the loading will be far better.
Only images larger than this will get placed into the images folder.
Regards,
Hopki
You can't dynamically change the colour of an SVG but if its file size and performance you're concerned about then did you know If a graphic is under 5K then it gets coded inline with the skin.js file.
This means the loading will be far better.
Only images larger than this will get placed into the images folder.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
- TheRealMojoJojo
- Posts: 341
- Joined: Thu Sep 20, 2018 10:18 pm
Hi Hopki,
Thanks for the quick response and no, I did not know that. That's good to know and thanks for sharing
Thanks for the quick response and no, I did not know that. That's good to know and thanks for sharing
Inline SVGs can be altered via javascript. Haven't had the need to do this myself yet, but here's a page on stackoverflow discussing it which may lead you to what you need?
https://stackoverflow.com/questions/987 ... javascript
https://stackoverflow.com/questions/987 ... javascript
- TheRealMojoJojo
- Posts: 341
- Joined: Thu Sep 20, 2018 10:18 pm
Very interesting stuff. It's a little outa my league but maybe someone with more coding experience can whip together a working script for us Thanks for sharing!mbb wrote: ↑Mon Jan 14, 2019 5:34 am Inline SVGs can be altered via javascript. Haven't had the need to do this myself yet, but here's a page on stackoverflow discussing it which may lead you to what you need?
https://stackoverflow.com/questions/987 ... javascript
Here's a cute little coloring script that I found online. It's implemented as an html page loaded via an iFrame in a text box. The link will take you to a page with the code.
Link: https://s3-ap-southeast-2.amazonaws.com ... index.html
Tony
Link: https://s3-ap-southeast-2.amazonaws.com ... index.html
Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
- TheRealMojoJojo
- Posts: 341
- Joined: Thu Sep 20, 2018 10:18 pm
That's actually pretty cool. Thanks for sharing Tony! I'll see if I can figure out a way incorporate the concept into my tours