Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

get dragged object to go back to pre-dragged locale

$
0
0

Howdy,

 

Here's the scenario... I've got a draggable object that shows up where I want it the first time > I drag it > drop it on a correct droppable, and things are fine.

 

Here's the code I'm using from creationComplete...

 

 

//Use the code! Draggable! Droppable!!     sym.$('ques1Drag').draggable({revert:'invalid', cursor:"pointer"});    //Droppable... on the target!     sym.$('objection_salesPt2').droppable({        accept: sym.$('ques1Drag'),            drop: function() {         sym.$('ques1Drag').hide();   //hides the draggable object                var correctShow = sym.createChildSymbol("correct", "Stage"); //shows a 'correct' feedback                   correctShow.getSymbolElement().css({"position":"absolute", "left":"500px", "top":"300px"});                   correctShow.play();         }     });

 

 

BUT, if a user chooses to go back to the beginning of the drag/drop section and re-do all of the drags and drops again, the draggable object shows up (yes, I've set code to say .show(); the object that was hidden after a correct drop) on top of the droppable object, not where it originally started.

 

Pre-drag... question mark gets dragged to Objections

 

 

If the user goes back to the beginning of the drag/drop section... here's where the draggable object shows up on the droppable (where it got left/dropped)

 

It's like the drag and drop function remembers where it got dropped, is there a way to reset this?

 

Yes the user could hit F5 and start all over, but then they'd have to go to the very beginning, not just the beginning of a section.

 

 

Thanks for any help,

 

R


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>