Quantcast

Freeplane file format changes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Freeplane file format changes

Dimitry Polivaev
Administrator
Hello,

recently I implemented two new features on branch 1.4.x and cherry-picked them to branch 1.3.x .
Now user can format node as centered so that node content appears centered. To save this information
I introduced a new attribute TEXT_ALIGN of XML element node with possible values LEFT, CENTER, RIGHT
and DEFAULT (DEFAULT means CENTER for root nodes and LEFT for other nodes).

Because centered nodes only make sense if node width is bigger than node content width, this feature
is likely to be used with setting minimum node width. Old solution saved in attribute MIN_WIDTH
allowed only to set node width in pixels, and it means that depending on the monitor resolution the
node width measured  in inches would be different. So I extended existing functionality so that
length unit can be selected between px, in, cm and mm.

So I have to decide how to save the new information.

To offer the most possible backwards compatibility I now save two attributes named MIN_WIDTH and
MIN_WIDTH_QUANTITY . The first attribute always contains length in pixels which is calculated for
the current setting. The second attribute has a format <NUMBER> <SPACE> <UNIT> like "1.5 cm" .

When the map is loaded the attribute with unit information has priority over the compatibility
attribute so that maps created with newer Freeplane versions can still be properly displayed in
older Freeplane versions.

Do you agree with this solution?
Should Freeplane map version be increased because of this change?
Do you have any other feedback?

Regards,
Dimitry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Freeplane file format changes

h.goebel
Administrator
Hi Dimitry,

here are my remarks:

1) Please do not shout in Tags and Attributes - at least for new ones.
Please use lower case, which is much easier to read. I know we have a
legacy here.

2) What is the value of "text-align" if the attribute is not given? Is
assume it is "default"?! So storing "default" for "test-align" is
useless IMHO.

3) Regarding "min-with-quantity" I have no better idea.

--
Regards
Hartmut Goebel

| Hartmut Goebel          | [hidden email]               |
| www.crazy-compilers.com | compilers which you thought are impossible |

--
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Freeplane file format changes

Dimitry Polivaev
Administrator
> 1) Please do not shout in Tags and Attributes - at least for new ones.
> Please use lower case, which is much easier to read. I know we have a
> legacy here.

Currently all other attributes are snake upper case. I do not think that only new attributes should
be different so that MIN_WIDTH is upper case but MIN_WIDTH_QUANTITY is lower case. And you?

> 2) What is the value of "text-align" if the attribute is not given? Is
> assume it is "default"?! So storing "default" for "test-align" is
> useless IMHO.

It makes sense because it allows to overwrite style attribute by a node attribute with value "DEFAULT".

Opinions?

Regards,
Dimitry
Loading...