Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G


Jump to: navigation, search

Canvas ND Framework

294 bytes removed, 16:49, 8 March 2016
Switch to {{gitorious url}} to fix the broken Gitorious links.
|Originally, it was a single monolithic update() method that would basically be called at frame rate using a settimer/maketimer callback.<br/>
When things were restructured, the conditional parts of this huge method were moved into predicates that reside in a huge hash: [https://{{gitorious.org/url|fg/|fgdata/source/|path=Nasal/canvas/map/navdisplay.styles#L14 https://gitorious.org/fg/fgdata/source/ ... styles#L14]|line=14}}<br/>Meanwhile, the update() method has been inflated again due to some logic that wasn't added to the hash, e.g. see: [https://{{gitorious.org/url|fg/|fgdata/source/|path=Nasal/canvas/map/navdisplay.mfd#L476 https://gitorious.org/fg/fgdata/source/ ... y.mfd#L476]|line=476}}<br/>
The meat of it still is in update(), and those "layers" are fairly boring meanwhile because they're separately managed by Philosopher's MapStructure framework.<br/>
But individual ND elements (canvas groups) are basically SVG-driven, i.e. SVG elements that are looked up and then updated/animated via timers and listeners: [https://{{gitorious.org/url|fg/|fgdata/source/|commit=f3df87622ca60eb45f359c05bd913524eeb44667:|path=Nasal/canvas/map/navdisplay.styles#L183 https://gitorious.org/fg/fgdata/source/ ... tyles#L183]|line=183}}<br/>
The actual code evaluating each SVG predicate is still called via the update() method, but it's just a foreach loop with a few lines:<br/>
[https://{{gitorious.org/url|fg/|fgdata/source/|path=Nasal/canvas/map/navdisplay.mfd#L760-769 https://gitorious.org/fg/fgdata/source/ ... d#L760-769]|line=760}}<br/>
None of this is set in stone, and we're actually looking forward to generalizing this some more.
|just so that I don't forget about it: [https://{{gitorious.org/url|fg/|fgdata/|commit/=7da1406cfbed8af69c5cefe215b4f327d791423d https://gitorious.org/fg/fgdata/commit/ ... 27d791423d]}}<br/>

Navigation menu