@@ -360,8 +360,8 @@ export default class Preview extends PreviewCollection {
360
360
}
361
361
362
362
// Move the content type
363
- if ( this . columnLineDropPlaceholder . hasClass ( ' active' )
364
- || this . columnLineBottomDropPlaceholder . hasClass ( ' active' ) ) {
363
+ if ( this . columnLineDropPlaceholder . hasClass ( " active" )
364
+ || this . columnLineBottomDropPlaceholder . hasClass ( " active" ) ) {
365
365
// if new column line placeholders are visible, add new column line and move column there
366
366
createColumnLine (
367
367
this . contentType . parentContentType ,
@@ -378,7 +378,7 @@ export default class Preview extends PreviewCollection {
378
378
379
379
} ) ;
380
380
} else {
381
- //@todo evaluate if this else is needed
381
+ // @todo evaluate if this else is needed
382
382
moveContentType ( column , movePosition . insertIndex , this . contentType ) ;
383
383
if ( modifyOldNeighbour ) {
384
384
updateColumnWidth ( modifyOldNeighbour , oldNeighbourWidth ) ;
@@ -491,14 +491,12 @@ export default class Preview extends PreviewCollection {
491
491
*/
492
492
private handleMouseUp ( ) : void {
493
493
494
- let index = - 1 ;
495
494
const self = this ;
496
495
const dragColumn = getDragColumn ( ) ;
497
496
if ( ( this . columnLineDropPlaceholder . hasClass ( "active" )
498
497
|| this . columnLineBottomDropPlaceholder . hasClass ( "active" ) )
499
498
&& ! dragColumn ) {
500
499
501
-
502
500
createColumnLine (
503
501
this . contentType . parentContentType ,
504
502
this . resizeUtils . getSmallestColumnWidth ( ) ,
@@ -1193,7 +1191,7 @@ export default class Preview extends PreviewCollection {
1193
1191
const self = this ;
1194
1192
for ( const child of this . contentType . parentContentType . children ( ) ) {
1195
1193
index ++ ;
1196
- if ( child . id == self . contentType . id ) {
1194
+ if ( child . id === self . contentType . id ) {
1197
1195
break ;
1198
1196
}
1199
1197
}
@@ -1204,28 +1202,25 @@ export default class Preview extends PreviewCollection {
1204
1202
return index ;
1205
1203
}
1206
1204
1207
-
1208
1205
private isColumnBeingMovedToAnotherColumnLine ( ) : boolean {
1209
- let column = getDragColumn ( ) ;
1206
+ const column = getDragColumn ( ) ;
1210
1207
if ( ! column ) {
1211
- //if no move position, column is not being moved.
1208
+ // if no move position, column is not being moved.
1212
1209
return false ;
1213
1210
}
1214
1211
1215
1212
if ( column . parentContentType !== this . contentType ) {
1216
- //if the parent content type is not same as this column line, column is being moved to new column line
1213
+ // if the parent content type is not same as this column line, column is being moved to new column line
1217
1214
return true ;
1218
1215
}
1219
1216
1220
1217
if ( column . parentContentType === this . contentType
1221
- && ( this . columnLineDropPlaceholder . hasClass ( ' active' )
1222
- || this . columnLineBottomDropPlaceholder . hasClass ( ' active' ) ) ) {
1223
- //since new column line drop placeholder is visible, column move will introduce a new column line
1218
+ && ( this . columnLineDropPlaceholder . hasClass ( " active" )
1219
+ || this . columnLineBottomDropPlaceholder . hasClass ( " active" ) ) ) {
1220
+ // since new column line drop placeholder is visible, column move should introduce a new column line
1224
1221
return true ;
1225
1222
}
1226
1223
1227
1224
return false ;
1228
1225
}
1229
-
1230
-
1231
1226
}
0 commit comments