MCPcopy Index your code
hub / github.com/shipshapecode/tether / _addOutOfBoundsClass

Function _addOutOfBoundsClass

src/js/constraint.js:69–83  ·  view source on GitHub ↗

* Add out of bounds classes to the list of classes we add to tether * @param {string[]} oob An array of directions that are out of bounds * @param {string[]} addClasses The array of classes to add to Tether * @param {string[]} classes The array of class types for Tether * @param {string} classPr

(oob, addClasses, classes, classPrefix, outOfBoundsClass)

Source from the content-addressed store, hash-verified

67 * @private
68 */
69function _addOutOfBoundsClass(oob, addClasses, classes, classPrefix, outOfBoundsClass) {
70 if (oob.length) {
71 let oobClass;
72 if (!isUndefined(outOfBoundsClass)) {
73 oobClass = outOfBoundsClass;
74 } else {
75 oobClass = getClass('out-of-bounds', classes, classPrefix);
76 }
77
78 addClasses.push(oobClass);
79 oob.forEach((side) => {
80 addClasses.push(`${oobClass}-${side}`);
81 });
82 }
83}
84
85/**
86 * Calculates if out of bounds or pinned in the X direction.

Callers 2

constraint.spec.jsFile · 0.85
positionFunction · 0.85

Calls 2

isUndefinedFunction · 0.90
getClassFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…