浏览代码

fix drag_target.cs

T -> Object 未修改
/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
c523f6df
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 16
      com.unity.uiwidgets/Runtime/widgets/drag_target.cs

16
com.unity.uiwidgets/Runtime/widgets/drag_target.cs


using System;
using System.Collections.Generic;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;

}
void _routePointer(PointerEvent pEvent) {
void _routePointer(PointerDownEvent pEvent) {
if (widget.maxSimultaneousDrags != null &&
_activeCount >= widget.maxSimultaneousDrags) {
return;

D.assert(!_candidateAvatars.Contains(avatar));
D.assert(!_rejectedAvatars.Contains(avatar));
if (avatar.data is T && (widget.onWillAccept == null || widget.onWillAccept(avatar.data))) {
if (avatar.data is _DragAvatar<T> && (widget.onWillAccept == null || widget.onWillAccept(avatar.data))) {
_rejectedAvatars.Add(avatar);
return false;
else {
setState(() => {
_rejectedAvatars.Add(avatar);
});
return false;
}
}
public void didLeave(_DragAvatar<T> avatar) {

}
public Widget _build(BuildContext context) {
RenderBox box = (RenderBox) overlayState.context.findRenderObject();
RenderBox box = overlayState.context.findRenderObject() as RenderBox;
Offset overlayTopLeft = box.localToGlobal(Offset.zero);
return new Positioned(
left: _lastOffset.dx - overlayTopLeft.dx,

正在加载...
取消
保存