Hi Fay,
I've been looking into this today a bit more closely and I've managed to use a simple JQuery function which reinserts the instructional text (#textholder) above all of the drag and drop components and this has helped to reduce the amount of dragging/scrolling involved:
Code:
//Position the instructional text at the very top of the template page, above all the drag and drop components
$("#textHolder").insertBefore("#pageContents");
I've then written some custom CSS which is executed via a media query when a window width is below 600px (i.e. on mobile phones):
Code:
/* Move the feedback text down below the 'Check Answers' button area */
#feedback {
margin-top: 70px;
}
/* Mobile */
@media (max-width:600px) {
/* Reduce the height of the drop landing areas to a minimum */
.target.bg.first.ui-droppable, .target.bg.ui-droppable {
height: 125px !important;
}
/* Extend the drop areas to 100% width of the screen and clear each landing zone on to it's own unique line */
.target.bg.ui-droppable, .target.bg.first.ui-droppable {
width: 100% !important;
display:block;
}
/* Move all the draggable labels to the left of the screen, as opposed to the right */
#labelHolder {
float: left;
}
/* OPTIONAL PROPERTY: You might need to experiment with your own label sizes. This was optimal for my project */
#dragDropHolder .label {
width: 45% !important;
}
}
This has resulted in a much better experience on mobile (see attached, below), but the one major issue I'm still trying to overcome is being able to drag my labels downwards (y axis) while also scrolling the main parent div (#dragDropHolder) at the exact same time. At the moment, when dragging a label, once you reach the bottom of the window on a mobile, you can't move it any further and it gets stuck, i.e. the scroll doesn't fire.
I've hit a bit of a brick wall with this one. If we can get this cracked, it would lead to the possibility of being able to drag items down to larger numbers of drop zones. I can't work out whether it is the 'position' or 'overflow' properties on the various components which are causing the scrolling problem or an underlying issue with the way the draggable labels are setup through JQuery?