Skip to content

Commit 4961acd

Browse files
set Grid's options float value
1 parent 75227e4 commit 4961acd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ coverage
66
dist
77
node_modules
88
.vscode
9+
.idea/

src/gridstack.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,10 @@ export class GridStack {
790790
* enable/disable floating widgets (default: `false`) See [example](http://gridstackjs.com/demo/float.html)
791791
*/
792792
public float(val: boolean): GridStack {
793-
this.engine.float = val;
794-
this._triggerChangeEvent();
793+
if (this.opts.float !== val) {
794+
this.opts.float = this.engine.float = val;
795+
this._triggerChangeEvent();
796+
}
795797
return this;
796798
}
797799

0 commit comments

Comments
 (0)