jeremyt
11 years agoContributor
Drag method drags different X lengths despite identical parameters
So I'm tying to draw a set of 4 horizontal lines down a page and inexplicably all the lines are drawing at different lengths despite having identical toX coordinates. Even weirder, if I run the code again the line lengths won't even be the same as the first run. How on earth is this possible?
Code Snippet:
var yStart = 150;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
yStart = yStart + 51;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
yStart = yStart + 51;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
yStart = yStart + 51;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
Expected visual result of above code:
--------------------------------
--------------------------------
--------------------------------
--------------------------------
Actual visual result of above code:
--------------------------------
-------------------------------------
----------------------------
-----------------------------------
As you can see in the code, I draw the same exact line every time except I move down the page 51 pixels each time (that part works). However I do not end up with 4 lines that are 410 in length, I will end up with 4 lines of totally random lengths. And to boot every time I execute the test, the length of the lines vary.
So as far as I can tell it would seem the Drag (ClintX, ClientY, toX, toY) is not working properly or am I missing something? Oh and for the record I'm using TC 10.10.
Code Snippet:
var yStart = 150;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
yStart = yStart + 51;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
yStart = yStart + 51;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
yStart = yStart + 51;
Aliases.CanvasContainer.Panel("dijit_WidgetBase_1").Panel(0).Drag(150, yStart, 410,0);
Expected visual result of above code:
--------------------------------
--------------------------------
--------------------------------
--------------------------------
Actual visual result of above code:
--------------------------------
-------------------------------------
----------------------------
-----------------------------------
As you can see in the code, I draw the same exact line every time except I move down the page 51 pixels each time (that part works). However I do not end up with 4 lines that are 410 in length, I will end up with 4 lines of totally random lengths. And to boot every time I execute the test, the length of the lines vary.
So as far as I can tell it would seem the Drag (ClintX, ClientY, toX, toY) is not working properly or am I missing something? Oh and for the record I'm using TC 10.10.