Skip to content

Commit

Permalink
Fixed whiteboard bug introduced by #57 fix (drawio-nextcloud-59)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohamedin committed Oct 24, 2023
1 parent 54eddea commit 31f2877
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/editor.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ import '@nextcloud/dialogs/dist/index.css'
if (contents === ' ')
{
OCA.DrawIO.NewFileMode = true;

// Whiteboard must have a valid content since no templates are shown (#59)
if (isWB)
{
// Empty diagram XML
contents = '<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
}
}

editWindow.postMessage(JSON.stringify({
Expand Down

1 comment on commit 31f2877

@davidjgraph
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

Please sign in to comment.