浏览代码

Merge branch 'yczhang' into match_flutter12

/main
Yuncong Zhang 6 年前
当前提交
29122ed2
共有 2 个文件被更改,包括 28 次插入7 次删除
  1. 24
      Runtime/gestures/binding.cs
  2. 11
      Runtime/ui/txt/text_buff.cs.meta

24
Runtime/gestures/binding.cs


public readonly HashSet<HitTestTarget> lastMoveTargets = new HashSet<HitTestTarget>();
readonly HashSet<HitTestEntry> _enteredTargets = new HashSet<HitTestEntry>();
void _handlePointerEvent(PointerEvent evt) {
if (evt is PointerScrollEvent) {
this._handlePointerScrollEvent(evt);

HitTestResult result = new HitTestResult();
this.hitTest(result, evt.position);
// enter event
D.assert(this._enteredTargets.Count == 0);
foreach (var hitTestEntry in result.path) {
if (this.lastMoveTargets.Contains(hitTestEntry.target)) {
hitTestEntry.target.handleEvent(evt, hitTestEntry);

hitTestEntry.target.handleEvent(new PointerEnterEvent(
timeStamp: evt.timeStamp,
pointer: evt.pointer,
device: evt.device,
kind: evt.kind
), hitTestEntry);
this._enteredTargets.Add(hitTestEntry);
//leave events
foreach (var lastMoveTarget in this.lastMoveTargets) {
lastMoveTarget.handleEvent(new PointerLeaveEvent(
timeStamp: evt.timeStamp,

), null);
}
//enter events
foreach (var hitTestEntry in this._enteredTargets) {
hitTestEntry.target.handleEvent(new PointerEnterEvent(
timeStamp: evt.timeStamp,
pointer: evt.pointer,
device: evt.device,
kind: evt.kind
), hitTestEntry);
}
this._enteredTargets.Clear();
this.dispatchEvent(evt, result);
}

11
Runtime/ui/txt/text_buff.cs.meta


fileFormatVersion: 2
guid: 5a3400c3021d8466e8113e3e7a9efcdf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存