Skip to content

Commit d79c711

Browse files
committed
commit a small change
1 parent 463aee8 commit d79c711

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/left-sidebar/ComponentTab/CreateMenuHTMLQueue.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)