|
|
|
|
|
|
} |
|
|
|
|
|
|
|
_TrackedAnnotation hitAnnotation = this._findAnnotation(hit); |
|
|
|
//enter
|
|
|
|
if (!hitAnnotation.activeDevices.Contains(deviceId)) { |
|
|
|
hitAnnotation.activeDevices.Add(deviceId); |
|
|
|
if (hitAnnotation.annotation?.onEnter != null) { |
|
|
|
hitAnnotation.annotation.onEnter(PointerEnterEvent.fromHoverEvent(lastEvent)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//hover
|
|
|
|
if (hitAnnotation.annotation?.onHover != null) { |
|
|
|
hitAnnotation.annotation.onHover(PointerHoverEvent.fromHoverEvent(lastEvent)); |
|
|
|
} |
|
|
|
|
|
|
|
//leave
|
|
|
|
foreach (_TrackedAnnotation trackedAnnotation in this._trackedAnnotations.Values) { |
|
|
|
if (hitAnnotation == trackedAnnotation) { |
|
|
|
|
|
|
|
|
|
|
trackedAnnotation.activeDevices.Remove(deviceId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//enter
|
|
|
|
if (!hitAnnotation.activeDevices.Contains(deviceId)) { |
|
|
|
hitAnnotation.activeDevices.Add(deviceId); |
|
|
|
if (hitAnnotation.annotation?.onEnter != null) { |
|
|
|
hitAnnotation.annotation.onEnter(PointerEnterEvent.fromHoverEvent(lastEvent)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//hover
|
|
|
|
if (hitAnnotation.annotation?.onHover != null) { |
|
|
|
hitAnnotation.annotation.onHover(PointerHoverEvent.fromHoverEvent(lastEvent)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |