Two elements sharing a single port

You’ll need to reorganize the SnappingTool code to put the movement calculations and actual move into a separate function that you can then call from your custom Layout.

There are lots of examples of custom layouts, especially in the extensions directory. And you can read about extensions generally at Extending GoJS -- Northwoods Software.