Hello,
I'm trying a drag&drop of an image in IE 10, qooxdoo 4.0.1, and the drop
target is never activated. I think this is due that IE creates a shallow
copy of the image in the dragging operation.
With a Label, it works
How can I solve that ?
here is a sample code.
Regards
Cyrille
-------------
/**
* @asset(dd/*)
* @asset(qx/icon/Tango/32/status/dialog-warning.png)
*/
qx.Class.define("dd.Application", {
extend : qx.application.Standalone,
members : {
main : function() {
this.base(arguments);
if (qx.core.Environment.get("qx.debug")) {
qx.log.appender.Native;
qx.log.appender.Console;
}
var doc = this.getRoot();
var pane = new qx.ui.container.Composite( new qx.ui.layout.VBox());
doc.add( pane, {width: "100%", height: "100%"});
var box1 = new qx.ui.container.Composite( new
qx.ui.layout.HBox()).set({
width : 100,
height : 100,
decorator : "main"
});
pane.add( box1);
var box2 = new qx.ui.container.Composite( new
qx.ui.layout.HBox()).set({
width : 100,
height : 100,
decorator : "main"
});
pane.add( box2);
box2.setDroppable( true);
var img = new
qx.ui.basic.Image("qx/icon/Tango/32/status/dialog-warning.png").set({
width : 100,
height : 100,
scale : true,
allowGrowX : false,
allowGrowY : false
});
img.setDraggable( true);
box1.add( img);
var label = new qx.ui.basic.Label( "Hello world");
label.setDraggable( true);
box1.add( label);
img.addListener( "dragstart", function(e) {
qx.log.Logger.debug( "dragstart");
e.addAction("move");
e.addType("image");
}, this);
label.addListener( "dragstart", function(e) {
qx.log.Logger.debug( "dragstart");
e.addAction("move");
e.addType("image");
}, this);
box2.addListener( "dragover", function(e) {
qx.log.Logger.debug( "dragover");
if (!e.supportsType("image")) {
qx.log.Logger.debug( this, 'source is not an image : prevent');
e.preventDefault();
}
}, this);
img.addListener( "droprequest", function(e) {
}, this);
box2.addListener( "drop", function(e) {
}, this);
}
}
});
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel