PDA

View Full Version : StatusProxy positioning



Tim Esselens
11 May 2007, 1:23 PM
Hi,

I am making something in BorderLayout with a Left (west) contentpanel which is a DragZone.

The elements are then dropped on the central-contentpanel, however when I drag an element to the right (past the scollbar of the central-contentpanel) the browser starts flickering as if the browser's viewport shifted from left and right and back again, you could call it feature.shake() :-). but I don't believe it was intended.

The flickering starts when the element below the cursor (is that the so called frame?) hits the scrollbar of the browserwindow (so past the docs bounds)

I believe this is due to the fact that the StatusProxy is appended to document.body. The ghost is trying to get to the right of the central-contentpanel, which is not what I want, I want it contained within the div I'm operating in.

I've tried reading the source for DragSource's constrainTo(), but I'm not sure how to implement these in my DropZone (the central-contentpanel). If I do constrainTo("the-div"), something goes wrong, it does a setXContraint(0,0), still need to figure out why...

So would it be possible (and would it be sane?) to do forward the variable config.parentEl from Ext.widgets.Layer through Ext.dd.StatusProxy on to Ext.dd.DragSource. Causing the whole ghost to be contained in the div I want, so it stays contained.

on a sidenote, IIRC I read something similar happening when dragging from top to bottom, usually related to fitToParent: true and containerScroll: true, but here it is appearing when from the left to the exreme right