public override void OnPointerDrop(PointerEvent evt)
        {
            _nodeCanvas.DestroyPreviewConnection();

            NodeHandle droppingHandle = GetNodeHandleAtPosition(evt.droppingObjects, evt.canvasPos);

            if (droppingHandle != null && droppingHandle.type == NodeHandle.HandleType.In)
            {
                _nodeCanvas.ConnectHandles(_draggingHandle, droppingHandle);
            }


            _draggingHandle = null;
        }
        public override void OnPointerDrop(PointerEvent evt)
        {
            List <NodePanel> updatedPanels = new List <NodePanel>();

            for (int i = 0; i < _nodeCanvas.selectedPanels.Count; i++)
            {
                NodePanel parent = _nodeCanvas.selectedPanels[i].Parent;
                if (parent != null && !updatedPanels.Contains(parent))
                {
                    updatedPanels.Add(parent);
                    if (parent.SortChildren())
                    {
                        _nodeCanvas.canvasState.SaveState();
                    }
                }
            }

            topLevelPanels = null;
            deltaPos       = Vector2.zero;
        }
示例#3
0
 public virtual void OnPointerClick(PointerEvent evt)
 {
 }
示例#4
0
 public virtual void OnPointerDrop(PointerEvent evt)
 {
 }
示例#5
0
 public virtual void OnPointerDown(PointerEvent evt)
 {
 }