Feature/checkpoints support#33
Conversation
|
Hi, can this be merged? I'm struggling with LibAvoid making my connections pretty, and i think i can fix it with these checkpoints. |
|
@Qoolerus thank you for the contribution! |
|
@K-4U Thanks for the reminder. I wasn’t sure about the changes in the typings, but I’ve just tested them, and they’re correct. Merged! A new beta version v0.5.0-beta.3 has been released as well. |
Aahh, awesome. Thank you! I've been using libavoid to work together with ELK, as ELK doesn't do the whole edge-routing without nodes moving. |
Good evening! Please note that this PR introduces changes to the beta version, the "new-emsdk-and-embed" branch. This version has some differences in interfaces compared to 0.4.5, because it uses a different binder - Embind. But migration is quite simple and fast. |
Hah, yeah think i'm running into that, lots of "Cannot convert 'undefined' to " things. Thought it was just me at first, but looks like all enums aren't being filled now. |
Update: It helps to read some of the other MR's commits. I eventually found that they're now further moved into some objects. Probably more of a C thing than a nodejs thing, but i don't care. One thing is that the For anybody stumbling upon this closed MR, this'll help: const getDirFlag: any = (pos: string) => {
const p = pos.toLowerCase();
// These values are bit flags, so we can combine them for corners. The default (no match) is 15 (all directions allowed).
if (p === 'right') return 8;
if (p === 'left') return 4;
if (p === 'top') return 1;
if (p === 'bottom') return 2;
return 15;
}; |
|
Great job! The checkpoints are working really well! See our example. I only noticed a minor issue: setting checkpoints doesn’t mark connectors as dirty / trigger re-routing (#34). Also, I occasionally see warnings like:
Is there a way to suppress these warnings? |
Support of Checkpoints