CSBrown wrote:
> I am trying to implement drag and drop from the table to another component.
> So far, I have only been able to attach an event to the table but that
> interferes with resizing and reordering the columns.
I don't understand this. Drag and drop happens in the table body. Column
resizing and reordering happens in the table header. How does this
interfere?
> I am trying to intercept the dragstart and cancel it if it originates from
> the table header. Also trying to embed html images in the table and use
> these to initiate the drag.
Adding a dragstart handler to the table should be sufficient.
Example:
myTable.addEventListener("dragstart", function(evt) {
var pageX = evt.getPageX();
var pageY = evt.getPageY();
var tableScroller = myTable.getTablePaneScrollerAtPageX(pageX);
if (tableScroller != null) {
var row = tableScroller._getRowForPagePos(pageX, pageY);
if (row != null && row != -1) {
// We are over a row -> Start dragging
evt.addData("mytype", getDataFromRow(row));
evt.addAction("move");
evt.startDrag();
}
};
});
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel