From: Christian W. <cwa...@gm...> - 2008-11-02 14:48:36
|
rivenwanderer wrote: > http://www.nabble.com/file/p20287577/defaults.lua defaults.lua > OK, that was easier than I'd expected! I've uploaded my implementation > (assuming the Nabble interface does what I want). The tabs may be wrong, > and the nesting of if blocks is a bit messy, but it works :) Cool, thanks for the contribution! > I discovered that if you specify a handle with a negative azimuth, it draws > properly when you show handles with "C", but the negative portion does not > recognize your clicks to transfer you to the target node. So I added a > check to make sure that my center-referenced coordinates are always > converted to positive azimuths (maybe this should be done for all azimuths? > or should other work be done so that the click is recognized?) Good point, I fixed this in revision 212 <http://pipmak.svn.sourceforge.net/viewvc/pipmak?view=rev&revision=212>. Your suggestion is good - wrapping the left edge of the handle into the range [0, 360) at creation time is more efficient than checking it modulo 360 in the hit test function. > I'd obviously like to see center-referenced handles make it into the > official release at some point Certainly - your change is in as revision 213 and will be included in the next release. I made one small change (besides fixing the indentation and adding documentation): assigning to handle.az is not necessary in the panoramic case, Pipmak only ever uses handle.x (and dito for el/y). > but I saw that the > pipmak_internal.handle(handle) function can be overridden by defining it in > my own project's main.lua, which makes me happy :) Well, yeah, but that's a bit hacky. Projects are not supposed to use pipmak_internal (that's why it's called internal) and its contents may change in arbitrary ways between releases, breaking your project. -Christian |