Open hbaileylxd opened 8 years ago
@hmaffin - First of all I would like to suggest you to use develop
branch for Adapt v2, now for your current requirement you need to change these lines as follows -
setupRandomisation: function() {
if(this.model.get('_isEnabled')) {
this.model.set('_draggableItems', _.shuffle(this.model.get('_draggableItems')));
if (this.model.get('_isRandom') && !this.model.get('_isSubmitted')) {
this.model.set('_droppableItems', _.shuffle(this.model.get('_droppableItems')));
}
}
},
Thanks!
Hmm now both my sets - drags and drops - are randomising, even though I have randomisation turned to false in the AT....
I'm having the same issue, would like the drag part to be randomized and the drop part to be in the same order everytime.
https://github.com/danielstorey/adapt-draganddrop is a good solution for now.
https://github.com/BATraining/adapt-dragAndDrop/pull/16 I did my own solution to the problem. With this it is possible to choose if you want drag or drop to be randomized, or both. :)
I wanted to randomise my draggable objects so I set random to true.
What it seems to do is randomise my draggable items AND my drop targets.
So I turned random to false.
Now my draggable objects are in the correct order to start with (which i don't want), but my drop targets (which I WANT in the order I added them) are mixed up!!
Any solution?