Setting a tool property using JavaScript API
Hi everyone,
I would like, in reaction to certains events, to select a tool and change its properties. Events are working fine.
Selecting a tool is done this way (example with the Brusgh tool):
fl.selectTool('brush');
We are are supposed to be able to get the current this way following the documentation, but it does not work.
var theTool = fl.tools.activeTool;I can't catch any error with a try/catch, but any line of code after this one will not execute.
Even if it would work, it would be a read only access to the tool, as stated in the documentation.
So, how to change a tool property (the Brush tool size for example) using the JavaScript API?
Would the solution be to create a custom tool based on an existing one, and set this custom tool properties during it's creation?
In a context where a property needs to be changed, would it mean creating a new custom tool each time this property changes?
Or am I thinking the wrong and is there a better solution?
Many thanks.
