PDA

View Full Version : (flex 3) StartDrag on UIComponent inside a Canvas glitchy Problem


springframework
07-07-2008, 05:58 PM
I have a Canvas with width = 500, height = 500; (both scrollPolicy = "off").

I have a UIComponent width = 8000, height = 2000; inside the canvas
UIComponent also has ~3200 TextFields in it.
(I just tested it with only width = 1000 and ~400 TextFields and still performs the exact same)

when i click on the UIComponent i call a startDrag with a bounding rectangle on it.

this works as it should.


the problem is ... When your mouse is over the canvas while draggin, the drag is all glitchy(not smooth). when u are dragging the UIComponent and your mouse is not over the canvas the dragging is extremely smooth, its perfect.

I want the dragging while your dragging and UIComponent to always be smooth, and not be glitchy when your mouse is over the canvas.

(I just tried covering everything with a canvas while dragging so that the mouse wouldn't be over the problem canvas, but actually over the covering canvas. this had no effect, when the mouse was over where the problem canvas was the dragging doesn't run smooth at all, it only updates after the mouse has stopped moving/moves extremely slow)

(I just switched startDrag to my own functions with mousedown/move/up and the problem still exists. i trace inside mouse_move and it traces all the proper information but the UIComponent does't update to the proper x and y co-ordinates until the mouse stops moving/moves slow. once the mouse is not over the UIComponent all the dragging works perfectly smooth ...)

springframework
07-16-2008, 06:10 PM
has anyone had something similar happen to them before?

this may be a bug and I will want to report it if someone can confirm it has happened to them.

kmxr
04-18-2009, 06:37 PM
I have no decent solution.
I am having the same problem.
I decided to take mouse messages only in the Canvas.This way I can pan the canvas smoothly.

To summarize,
mouse msg drag canvas drag UI

UI+Canvas smooth glitchy
Canvas only smooth n/a

Probably stopping the Canvas from "bubbling" will solve your problem.

kmxr
04-18-2009, 08:19 PM
This used to be my parent->child hierarchy

Application -> Canvas -> UIComponent -> (bunch of Sprites)

Okay, here's what I did to solve the glichy grag

Application->UIComponent->(a single Sprite ***)->(bunch of sprites)

*** This single sprite handles all my drag events.
Because the "bunch of sprites" are children of ***, they drag & transform as well.

Any questions, please ask.