This repository was archived by the owner on Apr 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ public void attachAnnotation(MouseTrackerAnnotation annotation) {
75
75
76
76
public void detachAnnotation ( MouseTrackerAnnotation annotation ) {
77
77
_TrackedAnnotation trackedAnnotation = this . _findAnnotation ( annotation ) ;
78
- D . assert ( trackedAnnotation != null , $ "Tried to detach an annotation that wasn't attached: { annotation } ") ;
79
78
foreach ( int deviceId in trackedAnnotation . activeDevices ) {
80
79
annotation . onExit ( PointerExitEvent . fromHoverEvent ( ( PointerHoverEvent ) this . _lastMouseEvent [ deviceId ] ) ) ;
81
80
}
@@ -125,6 +124,10 @@ _TrackedAnnotation _findAnnotation(MouseTrackerAnnotation annotation) {
125
124
126
125
return trackedAnnotation ;
127
126
}
127
+
128
+ bool isAnnotationAttached ( MouseTrackerAnnotation annotation ) {
129
+ return this . _trackedAnnotations . ContainsKey ( annotation ) ;
130
+ }
128
131
129
132
public void collectMousePositions ( ) {
130
133
void exitAnnotation ( _TrackedAnnotation trackedAnnotation , int deviceId ) {
Original file line number Diff line number Diff line change @@ -1942,6 +1942,11 @@ public PointerExitEventListener onPointerExit {
1942
1942
MouseTrackerAnnotation _hoverAnnotation ;
1943
1943
1944
1944
void _updateAnnotations ( ) {
1945
+ D . assert ( this . _onPointerEnter != this . _hoverAnnotation . onEnter ||
1946
+ this . _onPointerHover != this . _hoverAnnotation . onHover ||
1947
+ this . _onPointerExit != this . _hoverAnnotation . onExit ,
1948
+ "Shouldn't call _updateAnnotations if nothing has changed." ) ;
1949
+
1945
1950
if ( this . _hoverAnnotation != null && this . attached ) {
1946
1951
RendererBinding . instance . mouseTracker . detachAnnotation ( this . _hoverAnnotation ) ;
1947
1952
}
@@ -1960,6 +1965,8 @@ void _updateAnnotations() {
1960
1965
else {
1961
1966
this . _hoverAnnotation = null ;
1962
1967
}
1968
+
1969
+ this . markNeedsPaint ( ) ;
1963
1970
}
1964
1971
1965
1972
public override void attach ( Object owner ) {
You can’t perform that action at this time.
0 commit comments