Hi
Question: Is it possible to ‘clip’ a node to the bounds of a panel when dragging.
Clarification: Yes - I do mean dragging a node over a panel, not a part within a panel.
Scenario: The scenario is that I have a node drawn ‘over’ a panel. I wish to let the user drag the node but if the drag causes the dragged node to be positioned ‘outside’ the panel I want the part of the node that exceeds the bounds of the panel to become ‘clipped’ out of sight. The real world use case is a Gantt chart where the panel is the background to the chart and the node being dragged is a task bar - drag left to move back on the timeline and right to move ahead. The task should be constrained within the chart.
I wonder if this would be possible with a Group if the Placeholder could be set to have fixed bounds - possible ? I concur that the default behaviour of the placeholder flexing to encompass the grouped nodes is good, it’s just that I need it to be fixed bounds. (I read the Group placeholder explanation here See GoJS Groups -- Northwoods Software)
As a potential fall-back, I wonder if it would be possible to clip the node within the diagram assuming it is possible to stop the auto-scroll of the diagram.Is this correct ? If so are there any examples that demonstrate this feature ? This would allow me to upscale the panels to separate diagrams and achieve the clipping effect in that way.
I also appreciate that the minLocation and maxLocation can be used to constrain the drag.