How to handle task overlapping/collisions events using GOJS

How to handle task overlapping/collisions events using GOJS

What would you like to do? There are a lot of reasonable choices to make regarding potential behavior.

For example, to disallow overlapping nodes during a drag, see http://gojs.net/latest/samples/dragUnoccupied.html.

Hi Walter,

Hi Walter,

I have a following situation like 3 events overlap each other per a particular resource; one of the event (3rd) is hidden and other event (2nd) is sitting on top of first (Ist); but second event border I could see so that I could click on that event; 3rd event is completely hidden between Ist and 2nd; How to handle above situation using GOJS.

Best Regards
Venkat

Oh, are you using the nodes in the BPMN sample? I find that the events are positioned overlapping the main node but not each other, no matter how many events there are.

Hi Walter,

I have the following code that allowing me events to overlap

myDiagram =
$go(go.Diagram, “myDiagramdiv”,
{
contentAlignment: go.Spot.TopLeft,
position: new go.Point(-setting.resourceWidth, 0),
“toolManager.hoverDelay”: 10,
“draggingTool.isGridSnapEnabled”: true,
“draggingTool.gridSnapCellSpot”: new go.Spot(0, 0.25),
“draggingTool.gridSnapCellSize”: new go.Size(setting.daylyX / 24, setting.gridH),
“resizingTool.isGridSnapEnabled”: true,
allowDrop: true, // handle drag-and-drop from the Palette
“animationManager.isEnabled”: false,
“undoManager.isEnabled”: true,
layout: $go(go.Layout, { isInitial: false, isOngoing: false }) // never invalidates
});

        myDiagram.initialContentAlignment = go.Spot.TopLeft;
        myDiagram.padding = 0;

        myDiagram.grid =
            $go(go.Panel, "Grid",

              {
                  position: new go.Point(setting.resourceWidth, 0),
                  gridCellSize: new go.Size(setting.daylyX, setting.gridH)
              }
              , $go(go.Shape, "BarH", { fill: "#F1F1F1", interval: 2 })
              , $go(go.Shape, "LineV", { name: "dayly", stroke: "#F5F5F5", strokeWidth: 1, visible: true })
              , $go(go.Shape, "LineV", { stroke: "gray", strokeWidth: 1 })
              , $go(go.Shape, "LineH", { stroke: "lightgray", strokeWidth: 1 }));

Best Regards
Venkat

OK, I’ll assume you are not using our BPMN sample.

So have you tried using a custom Part.dragComputation handler, as demonstrated in that Drag Unoccupied sample?

I will try and let you know the result.

Thanks a lot.

Have a wonderful weekend!!

Best Regards
Venkat

A post was split to a new topic: Positioning two nodes with the same date

Hi Walter

Your solution is working for me

Thanks a lot.
Best Regards
Venkat

Hi Walter,

The above mentioned solution is working for sequential events with restrictive mode but I want a feature like when drag an event b on an event a then event b should be placed under Neath of event a on same grid cell. Is this possible in GOJS.

Best Regards
Venkat