File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2181,7 +2181,9 @@ export class GridStack {
21812181 if ( node . _temporaryRemoved ) return ; // handled by dropover
21822182 let distance = ui . position . top - node . _prevYPix ;
21832183 node . _prevYPix = ui . position . top ;
2184- Utils . updateScrollPosition ( el , ui . position , distance ) ;
2184+ if ( ! this . opts . disableAutoScroll ) {
2185+ Utils . updateScrollPosition ( el , ui . position , distance ) ;
2186+ }
21852187
21862188 // get new position taking into account the margin in the direction we are moving! (need to pass mid point by margin)
21872189 let left = ui . position . left + ( ui . position . left > node . _lastUiPosition . left ? - mRight : mLeft ) ;
Original file line number Diff line number Diff line change @@ -140,6 +140,9 @@ export interface GridStackOptions {
140140 Note: only used by addGrid(), else your element should have the needed class */
141141 class ?: string ;
142142
143+ /** disallows the scroll when dragging or resizing a widget (default?: false) */
144+ disableAutoScroll ?: boolean ;
145+
143146 /** disallows dragging of widgets (default?: false) */
144147 disableDrag ?: boolean ;
145148
You can’t perform that action at this time.
0 commit comments