Skip to content

Commit 5ad7299

Browse files
committed
maxHistoryLength
Add comment about maxHistoryLength for undo/redo
1 parent b0bfe95 commit 5ad7299

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/Diagram.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export class DiagramWrapper extends React.Component<DiagramProps, {}> {
6565
const diagram =
6666
$(go.Diagram,
6767
{
68-
'undoManager.isEnabled': true, // enable undo & redo
68+
'undoManager.isEnabled': true, // must be set to allow for model change listening
69+
// 'undoManager.maxHistoryLength': 0, // uncomment disable undo/redo functionality
6970
'clickCreatingTool.archetypeNodeData': { text: 'new node', color: 'lightblue' },
7071
draggingTool: new GuidedDraggingTool(), // defined in GuidedDraggingTool.ts
7172
'draggingTool.horizontalGuidelineColor': 'blue',

0 commit comments

Comments
 (0)