Example #1
0
 //Selects or deselects node
 void manageSelectedNode(TimelineNode nodeToAdd, Event currentEvent)
 {
     if (!selectedNodesList.isEmpty())
     {
         selectedNodesList.find(selectedNode => selectedNode == nodeToAdd).voidFold(
             () => {
             if (currentEvent.control)
             {
                 selectedNodesList.Add(nodeToAdd);
             }
             else if (selectedNodesList.Count >= 1)
             {
                 selectedNodesList.Clear();
                 selectedNodesList.Add(nodeToAdd);
             }
         },
             selectedNode => {
             if (currentEvent.control)
             {
                 selectedNodesList.Remove(nodeToAdd);
             }
         }
             );
     }
     else if (selectedNodesList.Count <= 1)
     {
         selectedNodesList.Clear();
         selectedNodesList.Add(nodeToAdd);
     }
 }
Example #2
0
        public void linkTo(TimelineNode linkTo)
        {
            _linkedNode = linkTo.some();

            if (element.startAt != Element.At.AfterLastElement)
            {
                convert(Element.At.AfterLastElement);
            }
        }
Example #3
0
 void moveDownIfOverlaping(TimelineNode timelineNode)
 {
     foreach (var overlapingNode in getOverlapingNodes(timelineNode))
     {
         selectedNodesList.find(foundNode => foundNode == overlapingNode).voidFold(
             () => moveAndRecurse(timelineNode),
             moveAndRecurse
             );
     }
     void moveAndRecurse(TimelineNode node)
     {
         node.increaseChannel();
         moveDownIfOverlaping(node);
     }
 }
Example #4
0
 void updateLinkedNodeStartTimes(TimelineNode node) =>
 getLinkedRightNode(node, node).voidFold(
     () => { },
     rightNode => {
     if (rightNode.linkedNode.valueOut(out var nodeLinkedTo) && nodeLinkedTo == node)
     {