MDL-68439 qtype_ddwtos: UI issues
authorHuong Nguyen <huongnv13@gmail.com>
Tue, 28 Apr 2020 10:13:57 +0000 (17:13 +0700)
committerHuong Nguyen <huongnv13@gmail.com>
Thu, 21 May 2020 10:19:40 +0000 (17:19 +0700)
 - Fixed cursor for dropped ddwtos
 - Fixed the animation of "flying back to the home position" starts off at the right end of the previous line"

question/type/ddwtos/amd/build/ddwtos.min.js
question/type/ddwtos/amd/build/ddwtos.min.js.map
question/type/ddwtos/amd/src/ddwtos.js
question/type/ddwtos/styles.css

index 1a47ad6..9734e8b 100644 (file)
Binary files a/question/type/ddwtos/amd/build/ddwtos.min.js and b/question/type/ddwtos/amd/build/ddwtos.min.js differ
index 4cde062..8aaa905 100644 (file)
Binary files a/question/type/ddwtos/amd/build/ddwtos.min.js.map and b/question/type/ddwtos/amd/build/ddwtos.min.js.map differ
index 3e9cee5..3369db2 100644 (file)
@@ -314,11 +314,11 @@ define(['jquery', 'core/dragdrop', 'core/key_codes'], function($, dragDrop, keys
         // Is there already a drag in this drop? if so, evict it.
         var oldDrag = this.getCurrentDragInPlace(this.getPlace(drop));
         if (oldDrag.length !== 0) {
-            oldDrag.addClass('beingdragged');
-            oldDrag.offset(oldDrag.offset());
             var currentPlace = this.getClassnameNumericSuffix(oldDrag, 'inplace');
             var hiddenDrop = this.getDrop(oldDrag, currentPlace);
             hiddenDrop.addClass('active');
+            oldDrag.addClass('beingdragged');
+            oldDrag.offset(hiddenDrop.offset());
             this.sendDragHome(oldDrag);
         }
 
index fc1067f..35fb15b 100644 (file)
@@ -34,7 +34,7 @@
     cursor: move;
 }
 
-.que.ddwtos .readonly .draghome {
+.que.ddwtos.qtype_ddwtos-readonly .draghome {
     cursor: default;
 }