great forum.
I have 2 questions about the Interactivity window panel.
In onclick, I can set opacity to 50% by [setAttribute('fill-opacity','0.5')] or [this.style.opacity=0.5].
Is there a list of things that can be achieved using the Interactivity window panel?
The second question is: Is it possible to change the opacity (or whatever feature) of another object using Interactivity window panel?
Interactivity window panel: two questions
Re: Interactivity window panel: two questions
just found the interactivity panel and options...
Re: Interactivity window panel: two questions
you can do whatever is permitted by javascript via interactivity (display message box, change color of all or some objects, show/hide layers, compute the first 1000 decimals of PI, play sound,zip file...) but you won't be able to test it in inkscape coz there's no javascript runtime.
you'll need to run the svg in a browser
if you want to address another object replace this.*** by document.getElementById("ID_of_the_second_object").***
eg document.getElementById("rect3355").style.opacity=0.5
document.getElementById("text3363").childNodes[0].innerHTML="foo text" will write foo text instead of current text in the text object with id "text3363"
childNodes[0] is because text in not written directly in a text objet but rather splitted in tspan sub object
you can ask for some input using window.prompt
var answer = window.prompt("Please enter your name");
document.getElementById("text3363").childNodes[0].innerHTML="Hello " + answer;
you'll need to run the svg in a browser
if you want to address another object replace this.*** by document.getElementById("ID_of_the_second_object").***
eg document.getElementById("rect3355").style.opacity=0.5
document.getElementById("text3363").childNodes[0].innerHTML="foo text" will write foo text instead of current text in the text object with id "text3363"
childNodes[0] is because text in not written directly in a text objet but rather splitted in tspan sub object
you can ask for some input using window.prompt
var answer = window.prompt("Please enter your name");
document.getElementById("text3363").childNodes[0].innerHTML="Hello " + answer;