Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade elk #2089

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion d2layouts/d2elklayout/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elk.js comes from https://github.com/kieler/elkjs
Currently on v0.8.2
Currently on v0.9.3

Attribution:

Expand Down
14 changes: 14 additions & 0 deletions d2layouts/d2elklayout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dev notes

ELKJS bundle is sourced from https://cdn.jsdelivr.net/npm/elkjs@0.3.0/lib/ .

By itself, it does not work, due to incompatability with the Javascript runner.

It has some code where it tries to set `$wnd` to whatever global is (e.g. self, window,
global), and tries to do global calls like `$wnd.Math()`.

This is not found when run in goja. But `Math()` is indeed set on global.

So I just find and replace all instances to not use a `$wnd` object.

I also remove references to `goog`, seems useless.
Loading
Loading