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

Function resize

src/components/scrollbar/index.js:188–196  ·  view source on GitHub ↗
(render = true)

Source from the content-addressed store, hash-verified

186 }
187
188 function resize(render = true) {
189 rect = $scrollbar.getBoundingClientRect();
190 height = rect.height - 20 - thumbHeight;
191 width = rect.width - 20 - thumbHeight;
192
193 if (height < 0) height = 0;
194 if (width < 0) width = 0;
195 if (render && height && width) setValue(scroll);
196 }
197
198 function setValue(val) {
199 if (!height || !width) resize(false);

Callers 4

onMoveFunction · 0.85
setThumbHeightFunction · 0.85
touchStartFunction · 0.85
setValueFunction · 0.85

Calls 1

setValueFunction · 0.70

Tested by

no test coverage detected