assumes offset parent is at top for the sake of simplicity
979575
function Sticky(head, title, toc, page, gradientBit) {
    page.style.paddingTop = maxHeadHeight;
    head.style.height = maxHeadHeight + "px";
    var padding = minHeadPadding + ((maxHeadPadding - minHeadPadding) * ((maxHeadHeight - minHeadHeight) / (maxHeadHeight - minHeadHeight)));
    head.style.padding = padding + "px 0px";
    title.style.fontSize = (maxHeadHeight - (padding * 2)) * 0.7;
    var pageScroll = Derivable.atom(window.scrollY);
    var tocScroll = Derivable.atom(toc.scrollTop);

    window.addEventListener('scroll', function () { pageScroll.set(window.scrollY); });
    toc.addEventListener('scroll', function () { tocScroll.set(this.scrollTop); });

    var headHeight = pageScroll.derive(function (scroll) {
      return Math.max(maxHeadHeight - scroll, minHeadHeight);
    });

    headHeight.react(function (headHeight) {
      spacer.style.height = headHeight + "px";
      gradientBit.style.marginTop = headHeight + "px";

      var scale = headHeight / maxHeadHeight;
      head.style.transform = "scale("+scale+","+scale+")";
    });

    var gradientOpacity = tocScroll.derive(function (scroll) {
      return Math.min(scroll / 20, 1);
    });

    gradientOpacity.react(function (opacity) {
      gradientBit.style.opacity = opacity;
    });
  }
1203731
function (t) {
        var o_p = this.offsetParent(),
            o = o_p.offset(),
            p = t.offset();

        p.top -= o.top;
        p.left -= o.left;

        return p;
      }
1215286
def horz_offset(self):
        
        x, xMode = self.x, self.xMode
        if x is None or xMode is None or xMode.val != ST_LayoutMode.FACTOR:
            return 0.0
        return x.val
1174789
public void offsetTo(float newLeft, float newTop) {
        right += newLeft - left;
        bottom += newTop - top;
        left = newLeft;
        top = newTop;
    }
128809
def _offset(self, x, y):
        """"""
        x, y = force_int(x, y)
        return y * self.width * 4 + x * 4
618219
def focus_parent(self):
        """"""
        w, focuspos = self.get_focus()
        parent = self._tree.parent_position(focuspos)
        if parent is not None:
            self.set_focus(parent)
719173
function(node) {
    if (node) {
        this.start = {
            line: node.start.line,
            column: node.start.column
        };
        this.end = {
            line: node.end.line,
            column: node.end.column
        };
        this.offset = {
            start: node.start.offset,
            end: node.end.offset
        };
    }
}
10147
function setOffsetToIndex(startIndex, offset, baseline) {
            const loc = sourceCode.getLocFromIndex(startIndex)
            setOffsetToLoc(loc, offset, baseline)
        }
982657
function offset(a,b,va,vb) {
				return abOffset[a * N + b] + va * params[b].n + vb;
			}
849117
function (event) {
        var offset = this.offset ()
        var pt = {
            x: event.clientX - offset.left,
            y: event.clientY - offset.top }
        return (pt.x >= 0) && (pt.y >= 0) && (pt.x < $(this).width ()) && (pt.y < $(this).height ()) }
92856
function () {
            var parent = this.offsetParent || document.body;
            while (parent && !rootNodeRE.test(parent.nodeName) && vQ(parent).css('position') == 'static') {
                parent = parent.offsetParent;
            }
            return vQ(parent);
        }
324624
function processTopLevelNode (node, expectedIndent) {
    const token = tokenStore.getFirstToken(node)
    const offsetInfo = offsets.get(token)
    if (offsetInfo != null) {
      offsetInfo.expectedIndent = expectedIndent
    } else {
      offsets.set(token, { baseToken: null, offset: 0, baseline: false, expectedIndent })
    }
  }
739117
function offset (ev, target) {
  var cx = ev.clientX || 0
  var cy = ev.clientY || 0
  var rect = bounds(target)
  return [ cx - rect.left, cy - rect.top ]
}
858418
function hasEnoughVerticalRoom(parentChartHeight, positionY) {
            return (parentChartHeight - margin.top - margin.bottom - chartHeight) - positionY > 0;
        }
1175976
function(e, offsetElement) {
        tip
            .gravity('e')
            .position({ left: e.e.clientX, top: e.e.clientY })
            .data(
                {
                    value: e.text,
                    series: e.series,
                })();
    }
31394
function (node, offset) {
      if (typeof offset === 'undefined') {
        offset = node.nodeType === 3 ? node.length : node.childNodes.length;
      }

      while (node && node.hasChildNodes()) {
        node = node.childNodes[offset];
        if (node) {
          offset = node.nodeType === 3 ? node.length : node.childNodes.length;
        }
      }
      return { node: node, offset: offset };
    }
1181272
function offsetLeft (elem) {
    let left = 0

    do {
      if (!isNaN(elem.offsetLeft)) left += elem.offsetLeft
    } while (elem = elem.offsetParent )

    return left
  }