Changing another object's attributes in onmouseover event

Post questions on how to use or achieve an effect in Inkscape.
Cammera
Posts: 2
Joined: Tue Aug 22, 2017 8:13 am

Changing another object's attributes in onmouseover event

Postby Cammera » Tue Aug 22, 2017 8:21 am

I've been trying to do this for a few hours now.
Basically, I want to, when object A has a onmouseover event, It's the atributes of object B to change.
To depict it visually, if my pointer is over the gray square, I'd like the orange one to change color, or to have diferent opacity.
Image
What's the easiest way to do this?

v1nce
Posts: 640
Joined: Wed Jan 13, 2010 4:36 am

Re: Changing another object's attributes in onmouseover event

Postby v1nce » Tue Aug 22, 2017 9:26 am

not tested

<rect id="grayone" onmouseover="document.getElementById('orangeone').style.fill='red'" ...>
<rect id="orangeone" ...>

Cammera
Posts: 2
Joined: Tue Aug 22, 2017 8:13 am

Re: Changing another object's attributes in onmouseover event

Postby Cammera » Tue Aug 22, 2017 9:46 am

Nnnop.
There's an extension with the portable release (0.92) that does this automatically, but it adds a metric ton of javascript AND only has worked in a years old version of chrome so far, 42.0. All other browsers I've tried have varying errors.

User avatar
Xav
Posts: 958
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Changing another object's attributes in onmouseover event

Postby Xav » Tue Aug 22, 2017 5:03 pm

Try this file:

onmouseover.svg
(6.64 KiB) Downloaded 31 times
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests