2010-11-21 16 views

Respuesta

11

Desde su documento SVG necesita llamar .createSVGPoint() para crear un nuevo punto (initlaized en 0,0), así:

var p = svgRoot.createSVGPoint(); 

SVGPoint (la interfaz en sí) no tiene constructor, por eso recibe un error actualmente.

+0

Excelente ... funciona. Gracias. – KRouane

+0

Defina svgRoot y qué tipo de elemento es – NuclearPeon

+1

@NuclearPeon: svgRoot es un elemento ''. El método ['createSVGPoint()'] (http://www.w3.org/TR/SVG11/struct.html#__svg__SVGSVGElement__createSVGPoint) se define para ['SVGSVGElement'] (http://www.w3.org/ TR/SVG11/struct.html # InterfaceSVGSVGElement) elemento de interfaz, es decir, un elemento [''] (http://www.w3.org/TR/SVG11/struct.html#SVGElement). –

-2

También se puede tratar de utilizar Raphaël librería javascript que implementan la API SVG alternativo y puede emular SVG en InternetExplorer 6+: http://raphaeljs.com/

+0

enlace roto .... – matteo

Cuestiones relacionadas