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 {
106
106
},
107
107
// METHODS FOR DRAG-AND-DROP
108
108
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
110
110
event .target .classList .add (' currentlyDragging' )
111
111
const dragId = id;
112
+ // store the id of dragged element
112
113
if (this .activeComponent === ' ' ) this .setSelectedIdDrag (dragId)
113
114
else this .setIdDrag (dragId)
114
115
},
115
116
dragEnter (event , id ) {
116
117
event .preventDefault ();
117
118
const dropId = id;
119
+ // store the id of the html element whose location the dragged html element could be dropped upon
118
120
if (this .activeComponent === ' ' ) this .setSelectedIdDrop (dropId)
119
121
else this .setIdDrop (dropId)
120
122
},
@@ -123,7 +125,7 @@ export default {
123
125
event .preventDefault ();
124
126
},
125
127
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
127
129
event .preventDefault ();
128
130
event .target .classList .remove (' currentlyDragging' )
129
131
// 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