1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-10 10:00:48 +09:00

fix graph hover

This commit is contained in:
Andrew Simachev 2023-04-27 13:46:47 +02:00
parent 91cf461656
commit 01f155f2f0
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -593,8 +593,12 @@ onMouseMove = ({ x, y }) => {
send('onMouseMove', { node: (d ? d.id : ''), x, y, k: transform.k });
redraw();
clearTimeout(timeoutHover);
if (!d) {
return;
};
timeoutHover = setTimeout(() => {
const d = getNodeByCoords(x, y);
if (d) {
@ -641,7 +645,6 @@ onAddNode = ({ target, sourceId }) => {
data.edges.push({ type: EdgeType.Link, source: source.id, target: target.id });
};
target = Object.assign(target, {
index: id,
vx: 1,