@@ -224,8 +224,6 @@ export class GridStack {
224224 /** @internal true if we got created by drag over gesture, so we can removed on drag out (temporary) */
225225 public _isTemp ?: boolean ;
226226
227- private isRtl = false ;
228-
229227 /**
230228 * @internal create placeholder DIV as needed
231229 * @returns the placeholder element for indicating drop zones during drag operations
@@ -335,7 +333,6 @@ export class GridStack {
335333 if ( opts . rtl ) {
336334 this . el . classList . add ( 'grid-stack-rtl' ) ;
337335 }
338- this . isRtl = opts . rtl ;
339336
340337 // check if we're been nested, and if so update our style and keep pointer around (used during save)
341338 const parentGridItem : GridItemHTMLElement = this . el . closest ( '.' + gridDefaults . itemClass ) ;
@@ -1924,7 +1921,7 @@ export class GridStack {
19241921 protected _writePosAttr ( el : HTMLElement , n : GridStackNode ) : GridStack {
19251922 // Avoid overwriting the inline style of the element during drag/resize, but always update the placeholder
19261923 if ( ( ! n . _moving && ! n . _resizing ) || this . _placeholder === el ) {
1927- const xProp = this . isRtl ? 'right' : 'left' ;
1924+ const xProp = this . opts . rtl ? 'right' : 'left' ;
19281925 // width/height:1 x/y:0 is set by default in the main CSS, so no need to set inlined vars
19291926 el . style . top = n . y ? ( n . y === 1 ? `var(--gs-cell-height)` : `calc(${ n . y } * var(--gs-cell-height))` ) : null ;
19301927 el . style [ xProp ] = n . x ? ( n . x === 1 ? `var(--gs-column-width)` : `calc(${ n . x } * var(--gs-column-width))` ) : null ;
@@ -2803,12 +2800,12 @@ export class GridStack {
28032800 start : onStartMoving ,
28042801 stop : onEndMoving ,
28052802 drag : dragOrResize ,
2806- rtl : this . isRtl ,
2803+ rtl : this . opts . rtl ,
28072804 } ) . resizable ( el , {
28082805 start : onStartMoving ,
28092806 stop : onEndMoving ,
28102807 resize : dragOrResize ,
2811- rtl : this . isRtl ,
2808+ rtl : this . opts . rtl ,
28122809 } ) ;
28132810 node . _initDD = true ; // we've set DD support now
28142811 }
0 commit comments