File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -106,15 +106,17 @@ export default {
106106 },
107107 // METHODS FOR DRAG-AND-DROP
108108 startDrag (event , id ) {
109- // add a class of 'currentlyDragging' to the HTML element that you are currently dragging
109+ // add a class to make the html element currently being drag transparent
110110 event .target .classList .add (' currentlyDragging' )
111111 const dragId = id;
112+ // store the id of dragged element
112113 if (this .activeComponent === ' ' ) this .setSelectedIdDrag (dragId)
113114 else this .setIdDrag (dragId)
114115 },
115116 dragEnter (event , id ) {
116117 event .preventDefault ();
117118 const dropId = id;
119+ // store the id of the html element whose location the dragged html element could be dropped upon
118120 if (this .activeComponent === ' ' ) this .setSelectedIdDrop (dropId)
119121 else this .setIdDrop (dropId)
120122 },
@@ -123,7 +125,7 @@ export default {
123125 event .preventDefault ();
124126 },
125127 endDrag (event ) {
126- // remove the 'currentlyDragging' class after the HTML is dropped
128+ // remove the 'currentlyDragging' class after the HTML is dropped to remove transparency
127129 event .preventDefault ();
128130 event .target .classList .remove (' currentlyDragging' )
129131 // invoke the action that will use the idDrag and idDrop to sort the HtmlList
You can’t perform that action at this time.
0 commit comments