isMouseInside: function()

in package/src/components/CanvasTable/FabricTable.js [81:102]


  isMouseInside: function () {
    const objects = this.getObjects()
    if (
      !objects ||
      !objects.length
    ) {
      return false
    }

    const { x: x1, y: y1 } = this.getP1Coords(objects)
    const { x: x2, y: y2 } = this.getP2Coords(objects)
    const { x, y } = this.opts.absolutePointer

    const target = this.canvas && this.canvas.findTarget(this.opts.e)
    return (
      x > x1 &&
      x < x2 &&
      y > y1 &&
      y < y2 &&
      target === this
    )
  },