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

Method _setupAutoHide

src/dd-resizable.ts:120–135  ·  view source on GitHub ↗

@internal turns auto hide on/off

(auto: boolean)

Source from the content-addressed store, hash-verified

118
119 /** @internal turns auto hide on/off */
120 protected _setupAutoHide(auto: boolean): DDResizable {
121 if (auto) {
122 this.el.classList.add('ui-resizable-autohide');
123 // use mouseover and not mouseenter to get better performance and track for nested cases
124 this.el.addEventListener('mouseover', this._mouseOver);
125 this.el.addEventListener('mouseout', this._mouseOut);
126 } else {
127 this.el.classList.remove('ui-resizable-autohide');
128 this.el.removeEventListener('mouseover', this._mouseOver);
129 this.el.removeEventListener('mouseout', this._mouseOut);
130 if (DDManager.overResizeElement === this) {
131 delete DDManager.overResizeElement;
132 }
133 }
134 return this;
135 }
136
137 /** @internal */
138 // eslint-disable-next-line @typescript-eslint/no-unused-vars

Callers 5

constructorMethod · 0.95
enableMethod · 0.95
disableMethod · 0.95
destroyMethod · 0.95
updateOptionMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected