code: protected void setupCutOutPosition(Element cutOut, Element relativeTo, int padding, boolean circle) {
          float top = relativeTo.getOffsetTop() - (Math.max($("html").scrollTop(), $("body").scrollTop()));
          float left = relativeTo.getAbsoluteLeft();
  
          float width = relativeTo.getOffsetWidth();
          float height = relativeTo.getOffsetHeight();
  
          if (circle) {
              if (width != height) {
                  float dif = width - height;
                  if (width > height) {
                      height += dif;
                      top -= dif / 2;
                  } else {
                      dif = -dif;
                      width += dif;
                      left -= dif / 2;
                  }
              }
          }
  
          top -= padding;
          left -= padding;
          width += padding * 2;
          height += padding * 2;
  
          $(cutOut).css("top", top + "px");
          $(cutOut).css("left", left + "px");
          $(cutOut).css("width", width + "px");
          $(cutOut).css("height", height + "px");
      }
docs: Setups the cut out position when the screen changes size or is scrolled.