File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
src/components/tile-manager Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,6 @@ class TileResizeState {
139139 * based on its new dimensions and starting position.
140140 */
141141 public calculateResizedGridPosition ( rect : DOMRect ) {
142- const { column, row } = this . _initialPosition ;
143-
144142 const colProps = this . getResizeSpanProps ( rect ) ;
145143 const rowProps = this . getResizeSpanProps ( rect , true ) ;
146144
@@ -149,10 +147,10 @@ class TileResizeState {
149147 this . _resizeUtil . calculateResizedSpan ( colProps ) ;
150148 this . _position . row . span = this . _resizeUtil . calculateResizedSpan ( rowProps ) ;
151149
152- const cssColumn = ` ${ column . start < 0 ? 'auto' : column . start } / span ${ this . _position . column . span } ` ;
153- const cssRow = ` ${ row . start < 0 ? 'auto' : row . start } / span ${ this . _position . row . span } ` ;
154-
155- return { column : cssColumn , row : cssRow } ;
150+ return {
151+ colSpan : this . _position . column . span ,
152+ rowSpan : this . _position . row . span ,
153+ } ;
156154 }
157155
158156 public calculateActualSize ( grid : HTMLElement ) {
Original file line number Diff line number Diff line change @@ -495,13 +495,13 @@ export default class IgcTileComponent extends EventEmitterMixin<
495495 private async _handleResizeEnd ( {
496496 detail : { state } ,
497497 } : CustomEvent < ResizeCallbackParams > ) {
498- const { column , row } = this . _resizeState . calculateResizedGridPosition (
498+ const { colSpan , rowSpan } = this . _resizeState . calculateResizedGridPosition (
499499 state . current
500500 ) ;
501501
502502 const { transition } = startViewTransition ( ( ) => {
503- this . style . setProperty ( 'grid-row' , row ) ;
504- this . style . setProperty ( 'grid-column' , column ) ;
503+ this . colSpan = colSpan ;
504+ this . rowSpan = rowSpan ;
505505 } ) ;
506506
507507 await transition ?. updateCallbackDone ;
You can’t perform that action at this time.
0 commit comments