3 Replies Latest reply on Sep 25, 2015 6:30 AM by resdesign

    drag & drop with snap to exact location?

    jack owen

      I am having problems trying to get a symbol to snap into place when dragged onto a droppable area.

      This is what I have so far in my mouseover:

       

       

      sym.$("Bulb1").draggable({opacity: 0.90, revert: "invalid"});

       

      sym.$("bulbHit1").droppable({

        tolerance: "touch",

        accept: sym.$("Bulb1"),

        drop: function(event,ui){

        ui.draggable.position( { of: $(this), my: 'center', at: 'middle',  } );

        },

        drop: function(){

        sym.getSymbol("Bulb1").play();

        }

        });