Description
setting x/y attributes on Line element throws vml exception |
|
When setting the x1, y1, x2 and y2 attributes on a newly created svg line element, IE throws this exception:
"illegal input string in Vector2D".
This is because, in line.js, starting from line 22, attributes that are not yet defined are used.
For example, when setting the 'x1' attribute on a newly created Line element, the y1 attribute is not yet defined, so 'this.getAttribute("y1")' will return <undefined>, which is clearly invalid.
Possible solution (starting from line 22):
case "x1":
oElement.from = oEvent.newValue + "," + ((this.getAttribute("y1")) ? this.getAttribute("y1") : 0);
break;
case "y1":
oElement.from = ((this.getAttribute("x1")) ? this.getAttribute("x1") : 0) + "," + oEvent.newValue;
break;
case "x2":
oElement.to = oEvent.newValue + "," + ((this.getAttribute("y2")) ? this.getAttribute("y2") : 0);
break;
case "y2":
oElement.to = ((this.getAttribute("x2")) ? this.getAttribute("x2") : 0) + "," + oEvent.newValue;
break;
|
|