File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 158
158
159
159
onDragStart ( evt ) {
160
160
if ( ! this . list ) {
161
- return
161
+ return true
162
162
}
163
163
this . context = this . getUnderlyingVm ( evt . item )
164
164
evt . item . _underlying_vm_ = this . clone ( this . context . element )
168
168
onDragAdd ( evt ) {
169
169
const element = evt . item . _underlying_vm_
170
170
if ( ! this . list || element === undefined ) {
171
- return
171
+ return true
172
172
}
173
173
removeNode ( evt . item )
174
174
const indexes = this . visibleIndexes
182
182
183
183
onDragRemove ( evt ) {
184
184
if ( ! this . list ) {
185
- return
185
+ return true
186
186
}
187
187
insertNodeAt ( this . rootContainer , evt . item , evt . oldIndex )
188
188
const isCloning = ! ! evt . clone
189
189
if ( isCloning ) {
190
190
removeNode ( evt . clone )
191
- return
191
+ return true
192
192
}
193
193
const oldIndex = this . context . currentIndex
194
194
this . list . splice ( oldIndex , 1 )
197
197
198
198
onDragUpdate ( evt ) {
199
199
if ( ! this . list ) {
200
- return
200
+ return true
201
201
}
202
202
removeNode ( evt . item )
203
203
insertNodeAt ( evt . from , evt . item , evt . oldIndex )
209
209
210
210
onDragMove ( evt ) {
211
211
const validate = this . validateMove
212
- if ( ! validate ) {
212
+ if ( ! validate || ! list ) {
213
213
return true
214
214
}
215
+
215
216
if ( evt . to === evt . from ) {
216
217
const destination = this . getUnderlyingVm ( evt . related )
217
218
console . log ( 'destination' , destination )
You can’t perform that action at this time.
0 commit comments