MCPcopy Index your code
hub / github.com/documentationjs/documentation / adjust

Function adjust

src/default_theme/assets/split.js:267–277  ·  view source on GitHub ↗
(offset)

Source from the content-addressed store, hash-verified

265 // Both sizes are calculated from the initial parent percentage,
266 // then the gutter size is subtracted.
267 function adjust(offset) {
268 var a = elements[this.a];
269 var b = elements[this.b];
270 var percentage = a.size + b.size;
271
272 a.size = (offset / this.size) * percentage;
273 b.size = percentage - (offset / this.size) * percentage;
274
275 setElementSize(a.element, a.size, this[aGutterSize], a.i);
276 setElementSize(b.element, b.size, this[bGutterSize], b.i);
277 }
278
279 // drag, where all the magic happens. The logic is really quite simple:
280 //

Callers

nothing calls this directly

Calls 1

setElementSizeFunction · 0.85

Tested by

no test coverage detected