1

I'm try to build an example of drag&drop but without success: following my code

Draggable object

$("#foo").draggable({
            appendTo:"body",
            stack:"body",
            zIndex: 27000,
            helper:"clone",
            drag: function(event, ui){
            },
            stop: function(e, ui){
            },
            start: function(e, ui){
                $(ui.helper).addClass("shadow");
            }
        });

Canvas

var canvas_str = draw2d.Canvas.extend({
            init: function(id){
                this._super(id);
                this.setScrollArea("#" + id);
                this.currentDropConnection = null;
            },
            onDragEnter : function( draggedFigure )
            {
                return null;
            },
            onDrop: function(droppedDomNode, x, y){
                console.log(droppedDomNode, x, y);
            }
        });

self.canvas = new canvas_str("mycanvas");

I'm trying to use http://draw2d.org/draw2d_touch/jsdoc_5/draw2d/examples/code_snippets/buildin_commandstack/index.html example but onDrop event not fire.

What I wrong?

pepperav
  • 527
  • 6
  • 16

0 Answers0