SwordsmanYao

Results 5 issues of SwordsmanYao

g6-editor中是这样实现的,在gg里面怎么写呢: const page = editor.getCurrentPage(); // 输入锚点不可以连出边 page.on('hoveranchor:beforeaddedge', ev => { if (ev.anchor.type === 'input') { ev.cancel = true; } }); page.on('dragedge:beforeshowanchor', ev => { // 只允许目标锚点是输入,源锚点是输出,才能连接 if (!(ev.targetAnchor.type ===...

第三种解法时间复杂度是 O(logn * logn) 不太理解: 比如这张图递归的节点数是 6 > 深度(4). 应该是大于 logn 的 每次递归时间复杂度应该是 logn ![image](https://user-images.githubusercontent.com/20725188/130203705-36e9e540-04fb-4878-aee9-c4af3167d943.png)