this._handler is "null or not an object error" in getScreenCTM() method of svg.js file in IE

113 views
Skip to first unread message

SND

unread,
Dec 14, 2010, 11:36:20 AM12/14/10
to SVG Web
Hi,
I am getting svgPoint object in IE using
var svgPoint=document.documentElement.createSVGPoint();

Now i am trying to get the matrix using
var matrix = document.documentElement.getScreenCTM(); //getScreenCTM()
method is defined in svg.js file.
in getScreenCTM() method msg is defined.
var msg = this._handler.sendToFlash('jsGetScreenCTM',
[ this._guid ]);
//Error: 'this._handler' is null or not an object


We are creating element using namespcae like
document.createElementNS(namespace,node);
// We are not setting any handler.
Should i set this handler or it should set somewhere else ?
Why it is saying that this._handler is null or not an object.

What to do for that.

Can someone please provide input on this. Thanks in advance.



Regards,
SND

R. Masters

unread,
Dec 15, 2010, 8:50:39 PM12/15/10
to svg...@googlegroups.com
I think you are going to need to post your full example.
I suspect you are trying to do SVG operations before the SVGLoad event
has fired.

Rick

> --
> You received this message because you are subscribed to the Google Groups "SVG Web" group.
> To post to this group, send email to svg...@googlegroups.com.
> To unsubscribe from this group, send email to svg-web+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/svg-web?hl=en.
>
>

SND

unread,
Dec 16, 2010, 5:35:11 AM12/16/10
to SVG Web
Hi Rick,
Thanks a lot for response.
We have div/panel called canvas. So, this canvas will hold the svg
root element which we add during initial creation of canvas. We are
creating svg element based on drag/drop of a another component where
we call following functionality.

eventCoordinates: function(event) {
var canvas = this.getCanvas(); //
var svgPoint=canvas.node.createSVGPoint(); //Working where node is
element of svg type.
svgPoint.x = event.clientX;
svgPoint.y = event.clientY;
var matrix=canvas.node.getCTM(); //Error: 'this._handler' is null or
not an object.
//var matrix = canvas.node.getScreenCTM();

return svgPoint.matrixTransform(matrix.inverse());
}

// getCTM(), getScreenCTM() is defined in svg.js file.

getScreenCTM: function() { //method of svg.js file
var msg = this._handler.sendToFlash('jsGetScreenCTM',
[ this._guid ]); //Erorr: this._handler is undefined.
msg = this._handler._stringToMsg(msg);
return new _SVGMatrix(new Number(msg.a), new Number(msg.b), new
Number(msg.c),
new Number(msg.d), new Number(msg.e), new
Number(msg.f),
this._handler);
}


Regards,
SND

On Dec 16, 6:50 am, "R. Masters" <gric...@gmail.com> wrote:
> I think you are going to need to post your full example.
> I suspect you are trying to do SVG operations before the SVGLoad event
> has fired.
>
> Rick
>
Reply all
Reply to author
Forward
0 new messages