Scripting node offsets

Scripting node offsets

Postby iainkewley » Tue Feb 18, 2014 7:10 pm

I was playing with some nodes relating to a project using the horizontal edge connector style. It struck me that if there was some way to set the distance between a node and it's parent depending on a formula, Freeplane can effectively be a GANNT chart itself. So each task would be a child node, with its horizontal displacement from the parent being determined by the time to the start of the task, and the width of the node related to the node width.

Any thoughts?

Iain
iainkewley
 
Posts: 65
Joined: Sat Dec 22, 2012 11:17 am

Re: Scripting node offsets

Postby boercher » Tue Feb 25, 2014 11:17 pm

It's an interesting idea to let scripts decide about the rendering of the map. Unfortunately it's not possible to do that via the scripting API - only via using internal programming interfaces. The scripting API is designed primarily to work on view/GUI independent layers ("the model"), which principally enables the scripts to function even with a different frontend, e.g. a mobile client. That said it wouldn't be impossible to provide methods to change the node offsets but I'm not sure how much it would take to provide a usable implementation.

Btw. have you tried http://freeplane.sourceforge.net/wiki/i ... and_Charts ? Also check out https://sourceforge.net/p/freeplane/dis ... d/ecb78d6e

Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am

Re: Scripting node offsets

Postby iainkewley » Thu Feb 27, 2014 8:22 pm

Hi Volker

I had a go with the GANTT chart a while ago and it sort of worked. I tried more recently and it refused to play at all. I'll have another go, but as I said, the inherent visual appeal of the mind map lends itself to just drawing it using offsets.

Iain
iainkewley
 
Posts: 65
Joined: Sat Dec 22, 2012 11:17 am

Re: Scripting node offsets

Postby dpolivaev » Fri Feb 28, 2014 8:09 am

Hi Iain,

you probably need following readable and writable properties in scripting node interface:
Code: Select all
node.horizontalShift
node.verticalShift
node.minimalDistanceBetweenChildren


Would it help you? Should I add them? It seems pretty easy.

Dimitry
User avatar
dpolivaev
Site Admin
 
Posts: 667
Joined: Sat Jul 23, 2011 1:21 pm

Re: Scripting node offsets

Postby iainkewley » Fri Feb 28, 2014 7:24 pm

If there was some easy way to control these, and it's not too much effort, that would be great

Iain
iainkewley
 
Posts: 65
Joined: Sat Dec 22, 2012 11:17 am

Re: Scripting node offsets

Postby dpolivaev » Sat Mar 01, 2014 6:28 pm

The new API is implemented and comes in the next preview. I hope that you share your scripts and maps with the community.

Regards, Dimitry
User avatar
dpolivaev
Site Admin
 
Posts: 667
Joined: Sat Jul 23, 2011 1:21 pm

Re: Scripting node offsets

Postby iainkewley » Sat Mar 01, 2014 6:32 pm

Hi. Dimitry

Many thanks for that. I'm not all that good with groovy but I'll have a play

Iain
iainkewley
 
Posts: 65
Joined: Sat Dec 22, 2012 11:17 am

Re: Scripting node offsets

Postby boercher » Sat Mar 08, 2014 11:30 pm

iainkewley wrote:I had a go with the GANTT chart a while ago and it sort of worked. I tried more recently and it refused to play at all.

Even if you have a better alternative now I would appreciate if you could tell me the kind of error (preferably with a logfile) you got since I try to keep the example scripts up-to-date.

Regards, Volker
boercher
 
Posts: 644
Joined: Tue Jul 26, 2011 7:13 am


Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron