anandaravindan
anandaravindan

Reputation: 2551

Kinetic js provides hit only inside a closed path on custom shapes

enter image description hereI am unable to trigger events in the desired path.. Here is an simple example, when I draw a line and wanted to trigger hit on mouseover of that line... Kinetic js itself closes the line path and provides hit only inside the region and not on the region below the mid of the line..

Below is the code and plunkr..

http://plnkr.co/edit/orCEGKENFkqn6fIy3IjE?p=preview

Upvotes: 0

Views: 164

Answers (1)

markE
markE

Reputation: 105035

There is a hit region on an unclosed Kinetic.line.

But, the hit region is not the entire width of its stroke.

For example, set your lineWidth to 60 and notice that your hit region becomes bigger.

Upvotes: 1

Related Questions