export function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, wrapper) {
  var offsetLeft = 0;
  if (wrapper && insideInlineLike && !insideLayout) {
    var currentNode = wrapper;
    var boundingRect = currentNode.getBoundingClientRect();
    offsetLeft = boundingRect.left - pmViewDom.getBoundingClientRect().left;
  }
  return offsetLeft;
}