File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ Change log
128
128
* fix: [ #2980 ] ( https://github.com/gridstack/gridstack.js/issues/2980 ) dd-touch circular dependency
129
129
* fix: [ #2667 ] ( https://github.com/gridstack/gridstack.js/issues/2667 ) sidebar items not honoring gs-w (enter-leave-re-enter)
130
130
* fix: [ #2987 ] ( https://github.com/gridstack/gridstack.js/issues/2987 ) gs-size-to-content to support numbers
131
+ * fix: [ #2981 ] ( https://github.com/gridstack/gridstack.js/issues/2981 ) Locked not working as expected
131
132
132
133
## 11.4.0 (2025-02-27)
133
134
* fix: [ #2921 ] ( https://github.com/gridstack/gridstack.js/pull/2921 ) replace initMouseEvent with MouseEvent constructor and added composed: true
Original file line number Diff line number Diff line change @@ -2459,14 +2459,16 @@ export class GridStack {
2459
2459
const noResize = node . noResize || this . opts . disableResize ;
2460
2460
2461
2461
// check for disabled grid first
2462
- const disable = this . opts . staticGrid || ( noMove && noResize ) ;
2462
+ const disable = node . locked || this . opts . staticGrid || ( noMove && noResize ) ;
2463
2463
if ( force || disable ) {
2464
2464
if ( node . _initDD ) {
2465
2465
this . _removeDD ( el ) ; // nukes everything instead of just disable, will add some styles back next
2466
2466
delete node . _initDD ;
2467
2467
}
2468
- if ( disable ) el . classList . add ( 'ui-draggable-disabled' , 'ui-resizable-disabled' ) ; // add styles one might depend on #1435
2469
- if ( ! force ) return this ;
2468
+ if ( disable ) {
2469
+ el . classList . add ( 'ui-draggable-disabled' , 'ui-resizable-disabled' ) ; // add styles one might depend on #1435
2470
+ return this ;
2471
+ }
2470
2472
}
2471
2473
2472
2474
if ( ! node . _initDD ) {
You can’t perform that action at this time.
0 commit comments