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

Method _resizing

src/dd-resizable.ts:191–204  ·  view source on GitHub ↗

@internal

(event: MouseEvent, dir: string)

Source from the content-addressed store, hash-verified

189
190 /** @internal */
191 protected _resizing(event: MouseEvent, dir: string): DDResizable {
192 this.scrolled = this.scrollEl.scrollTop - this.scrollY;
193 this.temporalRect = this._getChange(event, dir);
194 this._applyChange();
195 const ev = Utils.initEvent<GridStackMouseEvent>(event, { type: 'resize', target: this.el });
196 ev.resizeDir = dir; // expose handle direction so _dragOrResize can avoid position drift
197 ev.hasMovedX = this.option.rtl ? dir.includes('e') : dir.includes('w');
198 ev.hasMovedY = dir.includes('n');
199 if (this.option.resize) {
200 this.option.resize(ev, this._ui());
201 }
202 this.triggerEvent('resize', ev);
203 return this;
204 }
205
206 /** @internal */
207 protected _resizeStop(event: MouseEvent): DDResizable {

Callers 1

_setupHandlersMethod · 0.95

Calls 5

_getChangeMethod · 0.95
_applyChangeMethod · 0.95
initEventMethod · 0.80
_uiMethod · 0.80
triggerEventMethod · 0.80

Tested by

no test coverage detected