File tree Expand file tree Collapse file tree 4 files changed +42
-11
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web
content-type/column-group
js/content-type/column-group
ts/js/content-type/column-group Expand file tree Collapse file tree 4 files changed +42
-11
lines changed Original file line number Diff line number Diff line change 45
45
}
46
46
}
47
47
48
- .pagebuilder-content-type-wrapper.ui-sortable-helper {
48
+ .pagebuilder-content-type-wrapper.ui-sortable-helper ,
49
+ .pagebuilder-content-type.ui-draggable-dragging {
49
50
opacity : .7 ;
50
51
51
52
.pagebuilder-options {
Original file line number Diff line number Diff line change 44
44
opacity : 0 ;
45
45
position : absolute ;
46
46
top : -1px ;
47
- transform : translateX (-3px );
48
- transition : .5s opacity;
49
47
visibility : hidden ;
50
48
width : 6px ;
51
49
z-index : 26 ;
Original file line number Diff line number Diff line change @@ -802,11 +802,25 @@ export default class Preview extends PreviewCollection {
802
802
803
803
if ( this . movePosition ) {
804
804
this . dropPlaceholder . removeClass ( "left right" ) ;
805
+ const width = dragColumn . preview . element . outerWidth ( ) ;
806
+ let left = ( this . movePosition . placement === "left" ? this . movePosition . left : null ) ;
807
+ // The right position is only used when moving a column to the last position in the group
808
+ const right = ( this . movePosition . placement === "right" ?
809
+ groupPosition . outerWidth - this . movePosition . right : null
810
+ ) ;
811
+ /**
812
+ * If we're dragging the column from the left to the right we need to show the placeholder on
813
+ * the left hand side.
814
+ */
815
+ if ( left !== null && this . parent . children ( ) . indexOf ( dragColumn ) <
816
+ this . parent . children ( ) . indexOf ( this . movePosition . affectedColumn )
817
+ ) {
818
+ left = left - width ;
819
+ }
805
820
this . movePlaceholder . css ( {
806
- left : ( this . movePosition . placement === "left" ? this . movePosition . left : "" ) ,
807
- right : ( this . movePosition . placement === "right" ?
808
- groupPosition . outerWidth - this . movePosition . right - 5 : ""
809
- ) ,
821
+ width,
822
+ left,
823
+ right,
810
824
} ) . addClass ( "active" ) ;
811
825
} else {
812
826
this . movePlaceholder . removeClass ( "active" ) ;
You can’t perform that action at this time.
0 commit comments