toInnerClickEvent method

PCanvasClickEvent toInnerClickEvent(
  1. PCanvasClickEvent event, {
  2. PCanvasElement? targetElement,
  3. PCanvas? pCanvas,
})

Returns an event translated to the internal coordinates of this element.

Implementation

PCanvasClickEvent toInnerClickEvent(PCanvasClickEvent event,
    {PCanvasElement? targetElement, PCanvas? pCanvas}) {
  final boundingBox = this.boundingBox.resolve();
  return event.translate(-boundingBox.x, -boundingBox.y,
      targetElement: targetElement, pCanvas: pCanvas);
}