Re: renaming SVGPathSegList

If we think about renaming SVG Objects in the SVG DOM, we could rethink the complete concept of SVG DOM. I'd love to replace some SVG Objects / Unit types by corresponding CSS Object / units like SVGMatrix, SVGLength, SVGTransform and so on. They were useful in the past, but CSS improved a lot in the meantime and can take functionality over. That would also help supporting CSS Transitions / Animations with several SVG attributes. But it would definitely break backward compatibility! Every renaming would break backward compatibility!

Am 21.10.2011 um 20:42 schrieb Cameron McCormack:

> On 21/10/11 2:35 PM, Rick wrote:
>> Don't you mean SVGPathElement?
> 
> No, SVGPathSegList is the data type that holds path data, while <path> elements are SVGPathElement objects in the DOM.
> 
>> If you dropped the SVG prefix, all  SVG objects would be prefixed 'SVG'
>> except Path.  Bad, Bad idea!
> 
> Indeed, this would have to considered as part of an overall name simplification for the SVG datatype interfaces.  (See public-webapps for someone proposing to replace SVGMatrix and CSSMatrix with a Matrix interface, too.)
> 
>> var p = new SVGPathElement( string );
That would work. But don't we support it anyway by setting the 'd' attribute via normal DOM?

> 
> I think this is worth supporting too, but is different from my proposal.
> 
>> or
>> 
>> var list = new SVGPathSegList( string );
>> var p = new SVGPathElement( list );
> 
> That'd also work.
> 
>> or
>> 
>> construct individual segments (using constructors like --->
>> SVGPathSegCurveToQuadraticAbs() <---!!! )
> 
> Yeah, shame about those names! :)  Moving away from the constructor functions that you currently have to use would be good too, especially since they take their arguments in a different order from how they appear in path data strings!
> 
> Another possibility is `new SVGPathSeg("s 10,20")`.
> 

Dirk

Received on Friday, 21 October 2011 19:07:31 UTC