MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / onMove

Function onMove

src/components/sidebar/index.js:513–517  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

511 const { clientX } = getClientCoords(e);
512 let deltaX = 0;
513 const onMove = (e) => {
514 const { clientX: currentX } = getClientCoords(e);
515 deltaX = currentX - clientX;
516 resize(deltaX);
517 };
518 const onEnd = () => {
519 const newWidth = width + deltaX;
520 if (newWidth <= MIN_WIDTH) width = MIN_WIDTH;

Callers

nothing calls this directly

Calls 1

resizeFunction · 0.85

Tested by

no test coverage detected