I am using LocalStorageCommandHandler.js to achieve cross-page copying。
But I found that it affects grouping。
After adding: myDiagram.commandHandler = new LocalStorageCommandHandler();
o.diagram.commandHandler.canGroupSelection() always return false。
If you don’t replace the standard CommandHandler with the LocalStorageCommandHandler from the extensions directory, I bet you will still notice that CommandHandler.canGroupSelection always returns false. That is because the LocalStorageCommandHandler has nothing to do with groups.
Check the documentation for CommandHandler | GoJS API and see if any of its requirements to return true are not being met.
and add this initialization at the beginning of the Diagram initializers:
commandHandler: new LocalStorageCommandHandler(),
I find that the user can still group and ungroup, and myDiagram.commandHandler.canGroupSelection() returns true.
In looking at your code in your fiddle, I see your error: you replaced the Diagram.commandHandlerafter initializing the standard CommandHandler. So your final CommandHandler instance doesn’t have the needed initializations.