W3C home > Mailing lists > Public > www-svg@w3.org > October 2007

Re: Pointer Events in SVG

From: Dave Raggett <dsr@w3.org>
Date: Tue, 30 Oct 2007 10:51:18 +0000 (GMT)
To: Andreas Neumann <neumann@karto.baug.ethz.ch>
Cc: www-svg@w3.org
Message-ID: <alpine.DEB.0.99.0710301022040.6090@holly>

Thanks for raising the issue of the missing methods.

I am experimenting with ideas for a Web-based slide editing and 
presentation tool that is written in SVG. I would like this to work 
across a broad range of browsers, and the variations across them 
causes complications. Firefox and Opera, for example, present a 
messy DOM inherited from HTML, and this makes dealing with 
keystrokes a right mess, but is just do-able with per browser work 
arounds. SVG 1.2 is much much nicer with a well defined DOM and 
decent support for keystrokes.

My work is still at a very early stage, and uses a tspan element for 
the text editing cursor. I tried positioning a graphic instead, but 
found current implementations to be too inaccurate in the width 
reported for text for that to be a viable approach. In my SVG 1.1 
demo (see below), I use &#9997; for the cursor. This is Unicode 
glyph for a hand holding a pen. I also tried using the '|' 
character, but that comes with too much whitespace on either side, 
and trying to fix that with dx offsets proved way too problematic. 
SVG Fonts sound appealing, but currently lack widespread support.

SVG 1.1 demo:


One question that came up was how to position images accurately 
within a text line.  It would be nice if you could place a <use/> 
element as an alternative to a tspan, and have them flowed in a 
similar manner to HTML.

A work around is to use multiple text elements and position them via 
script, or to use an offset on a tspan to leave room for the image 
and then use script to work out where to place the image. This is a 
mess, and runs into the aforementioned inaccuracies reported for 
text widths, which vary from one browser to another.

p.s. the editable mechanism in SVG 1.2 is nice, but may not be 
appropriate for a slide editor due to the different way user agents 
support editable text. The tspan + script technique works nicely and 
doesn't rely on @editable.

  Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett

On Tue, 30 Oct 2007, Andreas Neumann wrote:

> I raised an issue about these missing methods with the SVG working 
> group. We will discuss whether we can add these methods back into 
> the uDom. I personally agree that these methods are important. 
> Some people weren't present at the SVG telcon, so I don't know if 
> there was any reasoning on why these methods weren't included.
> Andreas
Received on Tuesday, 30 October 2007 10:51:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:12 UTC