Comments (3)
Sadly, I have currently no idea. In this ticket, elkjs is initialized with a web-worker. Does this work for you?
from elkjs.
Sadly, I have currently no idea. In this ticket, elkjs is initialized with a web-worker. Does this work for you?
It does make it work but i had to copy the whole worker minified to my project which takes up like 2mb 😅
from elkjs.
Finally noticed that one of the answers in the other ticket was the solution, and didn't require me to copy the worker file :)
creating the elk layout like this is enough:
import ELK from 'elkjs/lib/elk-api' // It's important and necessary to import the library like this
const elk = new ELK({
defaultLayoutOptions: {
'elk.algorithm': 'layered',
'elk.layered.nodePlacement.strategy': 'SIMPLE',
'elk.direction': 'DOWN',
'elk.layered.spacing.nodeNodeBetweenLayers': '100',
},
workerFactory: () =>
new Worker(new URL('elkjs/lib/elk-worker.min.js', import.meta.url)),
})
from elkjs.
Related Issues (20)
- Mrtree algorithm direction property being ignored. HOT 3
- Elk Layered alorithm not giving the expected graph HOT 13
- Space between multiple nodes targeting single node HOT 5
- Aligning nodes with parent node HOT 2
- MrTree failing to layout Flowchart properly HOT 7
- How to error if layout takes too long? HOT 4
- [Question] Need some help with `layered` layout options HOT 8
- [Question] Does ELK support the use of (Extended) Backus-Naur Form (EBNF) conventions to define layout options? HOT 4
- Generate typings for elkjs-api based on ELK HOT 1
- Question: Long edge is not going around nodes HOT 1
- Support box layout along with edges HOT 1
- How can we prevent edges from overcrowding on a single surface of a node in a layered layout? HOT 5
- Specify Position for Specific Node in ELKJS HOT 2
- Build from source error (Ubuntu 22.04 LTS) HOT 1
- Incorrect Port Side Switching in ELKJS with ReactFlow HOT 14
- Layout option to force global `container: root` coordinates for all children and edges HOT 1
- Port alignment ignored when connecting from child to parent HOT 2
- Layered algorithm custom wrapping/placement HOT 2
- How to align children top position on the same level? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elkjs.