Core. HitArea

Mouse click area, you can set a series of vector graphics as a click area and non click area (currently only support round, rectangle, polygon)

Constructor

new HitArea()

Member

hit :Graphics

Clickable area allows you to draw a series of vector diagrams as the click area (which currently supports only circles, rectangles, polygons)

unHit :Graphics

The clickable region allows you to draw a series of vector diagrams as a non clickable area (currently only supported by circles, rectangles, polygons)

Methods

contains(x, y) → {Boolean}

Does the test object contain the specified point?.
Parameters:
Name Type Description
x Number The X axis value of the points (horizontal position).
y Number The Y axis value of the points (vertical position).
Returns:
Type:
Boolean
If the specified point is included, the value is true; otherwise false.

isHit(x, y) → {Boolean}

Does it contain a point?
Parameters:
Name Type Description
x Number X coordinate
y Number Y coordinate
Returns:
Type:
Boolean
Whether to click to