MCPcopy
hub / github.com/Splidejs/splide / exceededLimit

Function exceededLimit

src/js/components/Move/Move.ts:281–286  ·  view source on GitHub ↗

* Checks if the provided position exceeds the minimum or maximum limit or not. * * @param max - Optional. `true` for testing max, `false` for min, and `undefined` for both. * @param position - Optional. A position to test. If omitted, tests the current position. * * @return `true

( max?: boolean | undefined, position?: number )

Source from the content-addressed store, hash-verified

279 * @return `true` if the position exceeds the limit, or otherwise `false`.
280 */
281 function exceededLimit( max?: boolean | undefined, position?: number ): boolean {
282 position = isUndefined( position ) ? getPosition() : position;
283 const exceededMin = max !== true && orient( position ) < orient( getLimit( false ) );
284 const exceededMax = max !== false && orient( position ) > orient( getLimit( true ) );
285 return exceededMin || exceededMax;
286 }
287
288 return {
289 mount,

Callers 4

onPointerMoveFunction · 0.85
moveFunction · 0.85
scrollFunction · 0.85
updateFunction · 0.85

Calls 3

getPositionFunction · 0.85
orientFunction · 0.85
getLimitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…