getElementBounds static method

JSObject getElementBounds(
  1. String id
)

Implementation

static JSObject getElementBounds(String id) {
  var pixRatio = getDevicePixelRatio(Plotline.ctx);
  var screenHeight = (getScreenHeight(Plotline.ctx) * pixRatio).round();
  var screenWidth = (getScreenWidth(Plotline.ctx) * pixRatio).round();
  return Plotline.getViewPositionInWeb(
      id, pixRatio, screenWidth, screenHeight);
}