@@ -163,7 +163,7 @@ export class GridStack {
163163 * @param opt grids options used to initialize the grid, and list of children
164164 */
165165 public static addGrid ( parent : HTMLElement , opt : GridStackOptions = { } ) : GridStack {
166- if ( ! parent ) { return null ; }
166+ if ( ! parent ) return null ;
167167
168168 // create the grid element
169169 let doc = document . implementation . createHTMLDocument ( ) ;
@@ -621,7 +621,7 @@ export class GridStack {
621621 * Note: items will never be outside of the current column boundaries. default (moveScale). Ignored for 1 column
622622 */
623623 public column ( column : number , layout : ColumnOptions = 'moveScale' ) : GridStack {
624- if ( this . opts . column === column ) { return this ; }
624+ if ( this . opts . column === column ) return this ;
625625 let oldColumn = this . opts . column ;
626626
627627 // if we go into 1 column mode (which happens if we're sized less than minW unless disableOneColumnMode is on)
@@ -673,7 +673,7 @@ export class GridStack {
673673 * @param removeDOM if `false` grid and items HTML elements will not be removed from the DOM (Optional. Default `true`).
674674 */
675675 public destroy ( removeDOM = true ) : GridStack {
676- if ( ! this . el ) { return ; } // prevent multiple calls
676+ if ( ! this . el ) return ; // prevent multiple calls
677677 this . _updateWindowResizeEvent ( true ) ;
678678 this . setStatic ( true ) ; // permanently removes DD
679679 if ( ! removeDOM ) {
@@ -702,7 +702,7 @@ export class GridStack {
702702 * grid.enableResize(false);
703703 */
704704 public disable ( ) : GridStack {
705- if ( this . opts . staticGrid ) { return ; }
705+ if ( this . opts . staticGrid ) return ;
706706 this . enableMove ( false ) ;
707707 this . enableResize ( false ) ;
708708 this . _triggerEvent ( 'disable' ) ;
@@ -718,7 +718,7 @@ export class GridStack {
718718 * grid.enableResize(true);
719719 */
720720 public enable ( ) : GridStack {
721- if ( this . opts . staticGrid ) { return ; }
721+ if ( this . opts . staticGrid ) return ;
722722 this . enableMove ( true ) ;
723723 this . enableResize ( true ) ;
724724 this . _triggerEvent ( 'enable' ) ;
@@ -733,7 +733,7 @@ export class GridStack {
733733 * doEnable`s value by changing the disableDrag grid option (default: true).
734734 */
735735 public enableMove ( doEnable : boolean , includeNewWidgets = true ) : GridStack {
736- if ( this . opts . staticGrid ) { return this ; } // can't move a static grid!
736+ if ( this . opts . staticGrid ) return this ; // can't move a static grid!
737737 this . getGridItems ( ) . forEach ( el => this . movable ( el , doEnable ) ) ;
738738 if ( includeNewWidgets ) {
739739 this . opts . disableDrag = ! doEnable ;
@@ -748,7 +748,7 @@ export class GridStack {
748748 * doEnable`s value by changing the disableResize grid option (default: true).
749749 */
750750 public enableResize ( doEnable : boolean , includeNewWidgets = true ) : GridStack {
751- if ( this . opts . staticGrid ) { return this ; } // can't size a static grid!
751+ if ( this . opts . staticGrid ) return this ; // can't size a static grid!
752752 this . getGridItems ( ) . forEach ( el => this . resizable ( el , doEnable ) ) ;
753753 if ( includeNewWidgets ) {
754754 this . opts . disableResize = ! doEnable ;
@@ -978,7 +978,7 @@ export class GridStack {
978978 * @param val if true the grid become static.
979979 */
980980 public setStatic ( val : boolean ) : GridStack {
981- if ( this . opts . staticGrid === val ) { return this ; }
981+ if ( this . opts . staticGrid === val ) return this ;
982982 this . opts . staticGrid = val ;
983983 this . engine . nodes . forEach ( n => this . _prepareDragDropByNode ( n ) ) ; // either delete Drag&drop or initialize it
984984 this . _setStaticClass ( ) ;
@@ -1002,7 +1002,7 @@ export class GridStack {
10021002 }
10031003
10041004 GridStack . getElements ( els ) . forEach ( el => {
1005- if ( ! el || ! el . gridstackNode ) { return ; }
1005+ if ( ! el || ! el . gridstackNode ) return ;
10061006 let n = el . gridstackNode ;
10071007 let w = { ...opt } ; // make a copy we can modify in case they re-use it or multiple items
10081008 delete w . autoPosition ;
@@ -1111,7 +1111,7 @@ export class GridStack {
11111111
11121112 /** @internal */
11131113 private _triggerChangeEvent ( ) : GridStack {
1114- if ( this . engine . batchMode ) { return this ; }
1114+ if ( this . engine . batchMode ) return this ;
11151115 let elements = this . engine . getDirtyNodes ( true ) ; // verify they really changed
11161116 if ( elements && elements . length ) {
11171117 if ( ! this . _ignoreLayoutsNodeChange ) {
@@ -1125,7 +1125,7 @@ export class GridStack {
11251125
11261126 /** @internal */
11271127 private _triggerAddEvent ( ) : GridStack {
1128- if ( this . engine . batchMode ) { return this }
1128+ if ( this . engine . batchMode ) return this ;
11291129 if ( this . engine . addedNodes && this . engine . addedNodes . length > 0 ) {
11301130 if ( ! this . _ignoreLayoutsNodeChange ) {
11311131 this . engine . layoutsNodesChange ( this . engine . addedNodes ) ;
@@ -1140,7 +1140,7 @@ export class GridStack {
11401140
11411141 /** @internal */
11421142 public _triggerRemoveEvent ( ) : GridStack {
1143- if ( this . engine . batchMode ) { return this ; }
1143+ if ( this . engine . batchMode ) return this ;
11441144 if ( this . engine . removedNodes && this . engine . removedNodes . length > 0 ) {
11451145 this . _triggerEvent ( 'removed' , this . engine . removedNodes ) ;
11461146 this . engine . removedNodes = [ ] ;
@@ -1189,7 +1189,7 @@ export class GridStack {
11891189 // insert style to parent (instead of 'head' by default) to support WebComponent
11901190 let styleLocation = this . opts . styleInHead ? undefined : this . el . parentNode as HTMLElement ;
11911191 this . _styles = Utils . createStylesheet ( id , styleLocation ) ;
1192- if ( ! this . _styles ) { return this ; }
1192+ if ( ! this . _styles ) return this ;
11931193 this . _styles . _id = id ;
11941194 this . _styles . _max = 0 ;
11951195
@@ -1231,7 +1231,7 @@ export class GridStack {
12311231
12321232 /** @internal */
12331233 private _updateContainerHeight ( ) : GridStack {
1234- if ( ! this . engine || this . engine . batchMode ) { return this ; }
1234+ if ( ! this . engine || this . engine . batchMode ) return this ;
12351235 let row = this . getRow ( ) ; // checks for minRow already
12361236 // check for css min height
12371237 let cssMinHeight = parseInt ( getComputedStyle ( this . el ) [ 'min-height' ] ) ;
@@ -1248,7 +1248,7 @@ export class GridStack {
12481248 }
12491249 let cellHeight = this . opts . cellHeight as number ;
12501250 let unit = this . opts . cellHeightUnit ;
1251- if ( ! cellHeight ) { return this }
1251+ if ( ! cellHeight ) return this ;
12521252 this . el . style . height = row * cellHeight + unit ;
12531253 return this ;
12541254 }
@@ -1338,7 +1338,7 @@ export class GridStack {
13381338
13391339 // remove any key not found (null or false which is default)
13401340 for ( const key in node ) {
1341- if ( ! node . hasOwnProperty ( key ) ) { return ; }
1341+ if ( ! node . hasOwnProperty ( key ) ) return ;
13421342 if ( ! node [ key ] && node [ key ] !== 0 ) { // 0 can be valid value (x,y only really)
13431343 delete node [ key ] ;
13441344 }
@@ -1379,12 +1379,12 @@ export class GridStack {
13791379 }
13801380
13811381 if ( ! this . opts . disableOneColumnMode && this . el . clientWidth <= this . opts . minWidth ) {
1382- if ( this . _oneColumnMode ) { return this }
1382+ if ( this . _oneColumnMode ) return this ;
13831383 this . _oneColumnMode = true ;
13841384 this . column ( 1 ) ;
13851385 this . _resizeNestedGrids ( this . el ) ;
13861386 } else {
1387- if ( ! this . _oneColumnMode ) { return this }
1387+ if ( ! this . _oneColumnMode ) return this ;
13881388 delete this . _oneColumnMode ;
13891389 this . column ( this . _prevColumn ) ;
13901390 this . _resizeNestedGrids ( this . el ) ;
@@ -1497,25 +1497,25 @@ export class GridStack {
14971497 * @param els widget or selector to modify.
14981498 * @param val if true widget will be draggable.
14991499 */
1500- public movable ( els : GridStackElement , val : boolean ) : GridStack { return this ; }
1500+ public movable ( els : GridStackElement , val : boolean ) : GridStack { return this }
15011501 /**
15021502 * Enables/Disables resizing. No-op for static grids.
15031503 * @param els widget or selector to modify
15041504 * @param val if true widget will be resizable.
15051505 */
1506- public resizable ( els : GridStackElement , val : boolean ) : GridStack { return this ; }
1506+ public resizable ( els : GridStackElement , val : boolean ) : GridStack { return this }
15071507 /** @internal called to add drag over support to support widgets */
1508- public _setupAcceptWidget ( ) : GridStack { return this ; }
1508+ public _setupAcceptWidget ( ) : GridStack { return this }
15091509 /** @internal called to setup a trash drop zone if the user specifies it */
1510- public _setupRemoveDrop ( ) : GridStack { return this ; }
1510+ public _setupRemoveDrop ( ) : GridStack { return this }
15111511 /** @internal */
1512- public _setupRemovingTimeout ( el : GridItemHTMLElement ) : GridStack { return this ; }
1512+ public _setupRemovingTimeout ( el : GridItemHTMLElement ) : GridStack { return this }
15131513 /** @internal */
1514- public _clearRemovingTimeout ( el : GridItemHTMLElement ) : GridStack { return this ; }
1514+ public _clearRemovingTimeout ( el : GridItemHTMLElement ) : GridStack { return this }
15151515 /** @internal call to setup dragging in from the outside (say toolbar), with options */
15161516 public _setupDragIn ( ) : GridStack { return this ; }
15171517 /** @internal prepares the element for drag&drop **/
1518- public _prepareDragDropByNode ( node : GridStackNode ) : GridStack { return this ; }
1518+ public _prepareDragDropByNode ( node : GridStackNode ) : GridStack { return this }
15191519
15201520 // 2.x API that just calls the new and better update() - keep those around for backward compat only...
15211521 /** @internal */
0 commit comments