tst2005googlecode / svgpan

Automatically exported from code.google.com/p/svgpan
1 stars 0 forks source link

"use strict; gives three errors #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add "use strict"; to the javascript source code.

What is the expected output? What do you see instead?
No warning or errors in Firebug running Firefox 4.01

Three error pop up:
1. property name onmouseup appears more than once in object literal
function setupHandlers(root){
        setAttributes(root, {
                "onmouseup" : "add(evt)",
                "onmousedown" : "handleMouseDown(evt)",
                "onmousemove" : "handleMouseMove(evt)",
                "onmouseup" : "handleMouseUp(evt)",
I do not know how to solve this problem, other than commenting out the 
add(evt). What is the line doing anyway?

2. assignment to undeclared variable i line 114
 for (i in attributes) 
 correction is:
 for (var i in attributes) 
Otherwise i is global.

3. stateTf is undefined
 stateTf = stateTf.multiply(k.inverse()); in line 149
  StateTf is declared in line 58. 
I do not know what the problem is. 

It would be nice if someone could correct the problems.

Thank you

Original issue reported on code.google.com by arjenmei...@gmail.com on 8 May 2011 at 3:14

GoogleCodeExporter commented 9 years ago
The 'StateTF not defined' error only occurs if I am starting with a zoom mouse 
wheel. Zooming after a pan, gives no error. 

So it has noting to do with "use strict", but is a logic error. Question 
remains how to fix it.

Original comment by arjenmei...@gmail.com on 10 May 2011 at 2:39

GoogleCodeExporter commented 9 years ago
Fixed in 1.2.1

Original comment by andrea.l...@gmail.com on 3 Jul 2011 at 10:41