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

Method _resizeStart

src/dd-resizable.ts:172–188  ·  view source on GitHub ↗

@internal

(event: MouseEvent)

Source from the content-addressed store, hash-verified

170
171 /** @internal */
172 protected _resizeStart(event: MouseEvent): DDResizable {
173 this.sizeToContent = Utils.shouldSizeToContent(this.el.gridstackNode, true); // strick true only and not number
174 this.originalRect = this.el.getBoundingClientRect();
175 this.scrollEl = Utils.getScrollElement(this.el);
176 this.scrollY = this.scrollEl.scrollTop;
177 this.scrolled = 0;
178 this.startEvent = event;
179 this._setupHelper();
180 this._applyChange();
181 const ev = Utils.initEvent<MouseEvent>(event, { type: 'resizestart', target: this.el });
182 if (this.option.start) {
183 this.option.start(ev, this._ui());
184 }
185 this.el.classList.add('ui-resizable-resizing');
186 this.triggerEvent('resizestart', ev);
187 return this;
188 }
189
190 /** @internal */
191 protected _resizing(event: MouseEvent, dir: string): DDResizable {

Callers 1

_setupHandlersMethod · 0.95

Calls 8

_setupHelperMethod · 0.95
_applyChangeMethod · 0.95
shouldSizeToContentMethod · 0.80
getScrollElementMethod · 0.80
initEventMethod · 0.80
_uiMethod · 0.80
triggerEventMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected