예제 #1
0
        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;
        }
예제 #2
0
        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)
 {
 }