Inkscape Community

Help Using Inkscape => Beyond the Basics => Topic started by: lpt2007 on April 09, 2018, 10:35:22 AM

Title: tray tu use interactivity in object properties - please help
Post by: lpt2007 on April 09, 2018, 10:35:22 AM
Hi,

I try to use interactivity - onclick in object properties on example. I have two rectangles. On first I add undr interactivity - onclick --> style="display:none";. And when I click that rectangle become hidden. Now I wanna add under interactivity - onclick on second rectangle line to show back first rectangle. But I don't know how to do that? Can anyone please help me out? 

thx in advance
Title: Re: tray tu use interactivity in object properties - please help
Post by: Moini on April 09, 2018, 02:46:44 PM
You can write in German, if that's your language ;-)

You will need to use some real javascript for this, it needs to select the other object by id, and then change that object's status.
Title: Re: tray tu use interactivity in object properties - please help
Post by: lpt2007 on April 09, 2018, 02:53:41 PM
You can write in German, if that's your language ;-)

You will need to use some real javascript for this, it needs to select the other object by id, and then change that object's status.

Hi

Thanks for answer.

Do you know how? I have no experience in javascript language?
Title: Re: tray tu use interactivity in object properties - please help
Post by: Moini on April 10, 2018, 06:54:34 AM
I just linked to some articles a couple of days ago....

Found them again:

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Web--Javascript.html
https://eclipsesource.com/blogs/2012/07/03/wireframing-inkscape-javascript/
(at the bottom the function for selecting an element by its id is needed here)

As for the specific commands, please refer to javascript tutorials.