/// <summary> /// 单元格触摸抬起方法 /// </summary> /// <param name="cell">单元格</param> /// <param name="touchInfo">触摸信息</param> public override void onCellTouchUp(FCGridCell cell, FCTouchInfo touchInfo) { base.onCellTouchUp(cell, touchInfo); FCPoint mp = touchInfo.m_firstPoint; if (m_movingNode != null) { FCGridRow curRow = getRow(mp); //移动 if (curRow != null) { FCTreeNode curNode = curRow.getCell(0) as FCTreeNode; if (curNode.AllowDragIn && m_movingNode != curNode) { FCTreeNode curNodeParent = curNode.Parent; FCTreeNode movingNodeParent = m_movingNode.Parent; if (movingNodeParent != null) { movingNodeParent.removeNode(m_movingNode); } else { removeNode(m_movingNode); } //有父节点 if (curNodeParent != null) { if (movingNodeParent == curNodeParent) { curNodeParent.insertNode(curNodeParent.getNodeIndex(curNode), m_movingNode); } else { curNode.appendNode(m_movingNode); } } //无父节点 else { if (movingNodeParent == curNodeParent) { insertNode(getNodeIndex(curNode), m_movingNode); } else { curNode.appendNode(m_movingNode); } } curNode.expend(); } } m_movingNode = null; update(); } }