Creating a Hovermap

Post unfinished work here for feedback and advise.
richiekosher
Posts: 4
Joined: Thu Mar 22, 2018 12:40 am

Creating a Hovermap

Postby richiekosher » Sun Apr 01, 2018 5:48 pm

Hi,

I'm trying to do a HoverMap and I am struggling with some details.
First here is the object I'm currently editing:
http://richard.indigopage.de/

The Hover-Effect does only apply to the "rect-object" not to the text. So the cursor and opacity change when it touches the text and it looks like its flickering.
In a different version I tried to to do an invisible layer on top, but as I put my links on the invisible layer I lose the visibility of the "a:hover {opacity: 0.5}", because it then applies to the invisible layer.
Does someone have an idea how I could stop the flickering some way?


Greets,

Richard

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Creating a Hovermap

Postby Moini » Mon Apr 02, 2018 9:50 am

You'd need to add the javascript for the hover effect to a group that includes both the text and the box.
So, first group them, then add a short piece of javascript that selects the box and makes it lighter/partially transparent.

See http://tavmjong.free.fr/INKSCAPE/MANUAL ... cript.html for the general principle, and https://eclipsesource.com/blogs/2012/07 ... avascript/ with a more concrete hint at the very end.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

richiekosher
Posts: 4
Joined: Thu Mar 22, 2018 12:40 am

Re: Creating a Hovermap

Postby richiekosher » Tue Apr 03, 2018 7:03 pm

hey moini,

thanks for the answer. I now did the grouping and managed to put the "<a>" around the whole element.
Somehow the JS didn't work, but I'll definitely look into that, while keeping the CSS-Hover for now.
The flickering stopped and I got some more information and knowledge about shortcuts and functions of inkscape and JS.

Thanks again! ;-)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Creating a Hovermap

Postby Moini » Wed Apr 04, 2018 2:46 am

Happy fiddling - und viele Grüße aus dem Norden nach Hessen :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Work in progress”