Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-11-20 13:17:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f893e167923d26dd2cd3901833540910f86a9559
f893e167
1 parent
36f909af
test 点击显示四边锚点的操作
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
src/behavior/click-select.ts
src/behavior/hover-anchor-active.ts
src/behavior/click-select.ts
View file @
f893e16
...
...
@@ -64,6 +64,11 @@ export function clickSelect(G6) {
}
graph
.
setAutoPaint
(
autoPaint
);
graph
.
paint
();
// TEST: 点击时隐藏所有锚点,显示当前锚点
// graph.getNodes().forEach(node => {
// node.hideAnchor(graph)
// });
// item.showAnchor(graph)
},
onCanvasClick
()
{
...
...
src/behavior/hover-anchor-active.ts
View file @
f893e16
...
...
@@ -31,9 +31,11 @@ export function hoverAnchorActive(G6) {
onLeaveNode
(
e
)
{
try
{
const
item
=
e
.
item
;
item
.
hideAnchor
(
this
.
graph
)
// TEST: 注释掉鼠标离开时隐藏当前锚点,可以配合单击显示锚点使用。
item
.
hideAnchor
(
this
.
graph
);
}
catch
(
e
)
{
console
.
error
(
e
);
}
},
})
}
\ No newline at end of file
}
...
...
Please
register
or
login
to post a comment