Script incubator
A collection of scripts that might need a review before adding them to the "official" Scripts collection.
Feel free to add your own scripts to this page. If you give script a name using wiki text like
<groovy name="yourScriptName"> your script </groovy>
an extra download button is created for it, and it can be downloaded directly from this page.
Contents
Pair of scripts to increase/decrease the node-width (can be used with shortcuts!)
Since freeplane 1.5.x we can adjust the node-width with ALT+mouse-wheel, but there is currently no way to make it with keyboard shortcuts.
So these scripts aim at increasing/decreasing the node-width (the same way that ALT-mout-wheel would do), but by being scripts they will have a menu entry in "Tools/Scripts/Node Width_Increase" and "Tools/Scripts/Node Width_Decrease", making possible to create a shortcut to these menu entries, and so, to adjust the node-width with keyboard shortcuts.
How to install the scripts
- Download the 2 scripts from http://freeplane.sourceforge.net/wiki/index.php/Script_incubator and put them inside the directory "<freeplane-user-dir>/scripts" (you can open "<freeplane-user-dir>" clicking in "Tools/Open user directory")
- Restart Freeplane - Verify that the 2 new scripts appear in these 2 new menu-entries "Tools/Scripts/Node Width_Increase" and "Tools/Scripts/Node Width_Decrease"
- [optional] Assign a shortcut-key to each of the 2 menu-entries (hold CTRL while clicking a menu-entry)
Hope it helps :)
<groovy name="NodeWidth_Increase">
// @ExecutionModes({ON_SELECTED_NODE})
// zipizap, Feb2016 // Trying to solve this thread discussion [1] // Inspired by this node-width sample code [2] // Dedicated to the great and friendly freeplane community :) // // [1] https://sourceforge.net/p/freeplane/discussion/758437/thread/8f1d0faa/ // [2] https://sourceforge.net/p/freeplane/discussion/758437/thread/108a5c74/#2d6a
node.style.minNodeWidth += 9 node.style.maxNodeWidth = node.style.minNodeWidth </groovy>
<groovy name="NodeWidth_Decrease"> // @ExecutionModes({ON_SELECTED_NODE})
// zipizap, Feb2016 // Trying to solve this thread discussion [1] // Inspired by this node-width sample code [2] // Dedicated to the great and friendly freeplane community :) // // [1] https://sourceforge.net/p/freeplane/discussion/758437/thread/8f1d0faa/ // [2] https://sourceforge.net/p/freeplane/discussion/758437/thread/108a5c74/#2d6a
node.style.minNodeWidth -= 9 node.style.maxNodeWidth = node.style.minNodeWidth </groovy>
Author: User:zipizap