Blog  |   Sitemap  |   Search  |   Language:  eng рус
Home
JavaScript GUI FrameworkMostbet AzerbaycanBug TrackerBug details

Bug Data

ID: #0158
Status: Fixed
Severity: Normal
Reporter: dihae
Submitted: 23-11-09 13:45

Product Data

Product: Ample SDK
Component: SVG 1.1
Version: 0.8.x
OS: Windows XP
Browser: Internet Explorer 7.0

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;

Messages written for this bug

No messages has been appended yet.

Add a message
BugTracker