MCPcopy
hub / github.com/Flipboard/react-canvas / getRelativePosition

Function getRelativePosition

lib/Layout.js:163–168  ·  view source on GitHub ↗
(node, axis)

Source from the content-addressed store, hash-verified

161 // If both left and right are defined, then use left. Otherwise return
162 // +left or -right depending on which is defined.
163 function getRelativePosition(node, axis) {
164 if (leading[axis] in node.style) {
165 return getPosition(node, leading[axis]);
166 }
167 return -getPosition(node, trailing[axis]);
168 }
169
170 var leading = {
171 row: 'left',

Callers 1

Layout.jsFile · 0.85

Calls 1

getPositionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…