toJSON method

dynamic toJSON()

Implementation

toJSON() {
  return {"x": x, "y": y, "button": button};
}