Skip to content

Commit ee653c6

Browse files
authored
Merge pull request formio#547 from dierbro/no-drag-feature
Configure dragula to check if a component can be dragged using the 'no-drag' class
2 parents aa3fd39 + ea40c8c commit ee653c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/WebformBuilder.js

+3
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,9 @@ export default class WebformBuilder extends Webform {
746746
this.dragula.destroy();
747747
}
748748
this.dragula = dragula(this.sidebarContainers.concat(this.dragContainers), {
749+
moves(el) {
750+
return !el.classList.contains('no-drag');
751+
},
749752
copy(el) {
750753
return el.classList.contains('drag-copy');
751754
},

0 commit comments

Comments
 (0)