MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / _setStaticClass

Method _setStaticClass

src/gridstack.ts:2008–2020  ·  view source on GitHub ↗

@internal

()

Source from the content-addressed store, hash-verified

2006
2007 /** @internal */
2008 protected _setStaticClass(): GridStack {
2009 const classes = ['grid-stack-static'];
2010
2011 if (this.opts.staticGrid) {
2012 this.el.classList.add(...classes);
2013 this.el.setAttribute('gs-static', 'true');
2014 } else {
2015 this.el.classList.remove(...classes);
2016 this.el.removeAttribute('gs-static');
2017
2018 }
2019 return this;
2020 }
2021
2022 /**
2023 * called when we are being resized - check if the one Column Mode needs to be turned on/off

Callers 2

constructorMethod · 0.95
setStaticMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected