micolous.id.au

The result of a blogging accident

SVGForm alpha3; menus, input boxes, focus model... oh my!

I’ve updated SVGForm now to alpha3. It now includes some new stuff, a simple menu system (and I mean, simple), and a focus model allowing an input control to work.

I’ve changed the way label elements are positioned now, and they all use the `hanging` `dominant-baseline`. Unfortunately Opera 9.5 doesn’t support `dominant-baseline` [just yet][operasvg], so all the UI elements will look messed up there. It works fine in Firefox 2 and Firefox 3 though, and I’ve heard it also works in Safari on OSX fine too. Unfortunately because Internet Explorer doesn’t have inbuilt SVG support (and [Adobe’s SVG viewer is discontinued][adobesvgeol]), so you may have to wait for Internet Explorer 8 and hope they add support for SVG and the SVG DOM.

|image0|

[Clicking Bricks][cbsvg] has been updated to use the new version of the library... no new functionality in it. There’s an [SVG part (click this to run)][cbsvg], and the [source script file][cbjs].

|image1|

There’s also a little [focus model test][fsvg] that has an input box and a menu that doesn’t do very much. There’s an [SVG part (click this to run)][fsvg], and the [source script file][fjs].

And there’s [SVGForm’s source itself][svgform] if you have a thing for reading source code. It’s now getting quite big, at about 30kB!

Again, it’s still licensed under the [GNU General Public License v2][gpl2], or at your option, any later version published by the Free Software Foundation (this includes GPL3). Once this starts coming along a bit more, I’ll probably change the license to something more appropriate for web application development - as presently you would have to license the JavaScript/ECMAScript and SVG portions of your site also under the GPL as they link to it. As it’s still alpha and incomplete, this shouldn’t be much of an issue for now.

[cbsvg]: /static/projects/svgform/tests/alpha3/clickingbricks.svg [cbjs]: /static/projects/svgform/tests/alpha3/clickingbricks.js [svgform]: /static/projects/svgform/tests/alpha3/svgform.js [fsvg]: /static/projects/svgform/tests/alpha3/focus.svg [fjs]: /static/projects/svgform/tests/alpha3/focus.js [operasvg]: http://www.opera.com/docs/specs/svg/ [adobesvgeol]: http://www.adobe.com/svg/eol.html [gpl2]: http://www.gnu.org/licenses/gpl-2.0.html