浏览代码

fix flutter bug (refer to b3a5be86)

/main
xingwei.zhu 5 年前
当前提交
dfc558f0
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 5
      Runtime/gestures/mouse_tracking.cs
  2. 7
      Runtime/rendering/proxy_box.cs

5
Runtime/gestures/mouse_tracking.cs


public void detachAnnotation(MouseTrackerAnnotation annotation) {
_TrackedAnnotation trackedAnnotation = this._findAnnotation(annotation);
D.assert(trackedAnnotation != null, $"Tried to detach an annotation that wasn't attached: {annotation}");
foreach (int deviceId in trackedAnnotation.activeDevices) {
annotation.onExit(PointerExitEvent.fromHoverEvent((PointerHoverEvent) this._lastMouseEvent[deviceId]));
}

}
return trackedAnnotation;
}
bool isAnnotationAttached(MouseTrackerAnnotation annotation) {
return this._trackedAnnotations.ContainsKey(annotation);
}
public void collectMousePositions() {

7
Runtime/rendering/proxy_box.cs


MouseTrackerAnnotation _hoverAnnotation;
void _updateAnnotations() {
D.assert(this._onPointerEnter != this._hoverAnnotation.onEnter ||
this._onPointerHover != this._hoverAnnotation.onHover ||
this._onPointerExit != this._hoverAnnotation.onExit,
"Shouldn't call _updateAnnotations if nothing has changed.");
if (this._hoverAnnotation != null && this.attached) {
RendererBinding.instance.mouseTracker.detachAnnotation(this._hoverAnnotation);
}

else {
this._hoverAnnotation = null;
}
this.markNeedsPaint();
}
public override void attach(Object owner) {

正在加载...
取消
保存