File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web
js/content-type/column-line
ts/js/content-type/column-line Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -744,11 +744,16 @@ export default class Preview extends PreviewCollection {
744
744
745
745
const siblings = this . contentType . parentContentType . children ( ) ;
746
746
const id = this . contentType . id ;
747
- const firstLine = siblings . shift ( ) ;
747
+ let index = 0 ;
748
+ siblings . forEach ( ( columnLine ) => {
749
+ if ( columnLine . id === id ) {
750
+ return false ;
751
+ }
752
+ index ++ ;
753
+ } ) ;
748
754
// show column line drop placeholder only for top column line in a group
749
- const draggedColumn = getDragColumn ( ) ;
750
755
751
- return ( this . dropOverElement || draggedColumn ) &&
756
+ return this . dropOverElement &&
752
757
event . pageY > linePosition . top &&
753
758
event . pageY < linePosition . top + this . lineDropperHeight ;
754
759
}
@@ -1186,7 +1191,6 @@ export default class Preview extends PreviewCollection {
1186
1191
private getNewColumnLineIndex ( ) : number {
1187
1192
let index = - 1 ;
1188
1193
const self = this ;
1189
- alert ( this . contentType . parentContentType . getChildren ( ) ( ) . length ) ;
1190
1194
for ( const child of this . contentType . parentContentType . children ( ) ) {
1191
1195
index ++ ;
1192
1196
if ( child . id == self . contentType . id ) {
You can’t perform that action at this time.
0 commit comments