Jan (HL)
21 Nov 2011, 6:28 AM
With Ext JS 3, we could register/override within "ddConfig" methods like onNodeEnter, onNodeOver. Because real callbacks weren't available this was the only possibility to make things like: Render the current target/drop node's background red if dropping not allowed ("extended" text) or a custom check if the drop is allowed (in a special context, e.g. a grid's account row from the right aren't allowed to drop on the left tree's customers node). Earlier, the grid's drag configuration supported a dynamic getter callback generating a custom drag text.
Actually, I would prefer a better official and public callback api. However, it'd worked.
Now with Ext JS 4, the stuff moved into views' plugins and it seems impossible -- or not easy without breaking something -- to extend the drag and drop functionality. Some initializations only use some props or fixed types.
Beforedrop does not solve anything, because it checks only AFTER dropping. But for an UI I have to check BEFORE the user (can) drop(s).
Small notice: The drag and drop guide of the documentation isn't up to date and doesn't handle the table (grid/tree) plugins drag/drop.
Actually, I would prefer a better official and public callback api. However, it'd worked.
Now with Ext JS 4, the stuff moved into views' plugins and it seems impossible -- or not easy without breaking something -- to extend the drag and drop functionality. Some initializations only use some props or fixed types.
Beforedrop does not solve anything, because it checks only AFTER dropping. But for an UI I have to check BEFORE the user (can) drop(s).
Small notice: The drag and drop guide of the documentation isn't up to date and doesn't handle the table (grid/tree) plugins drag/drop.