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

JS-4200: HeaderMainGraph as functional component

This commit is contained in:
Andrew Simachev 2024-12-06 18:54:11 +01:00
parent 86bff1469a
commit e8f4c31d92
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
4 changed files with 49 additions and 45 deletions

View file

@ -623,7 +623,9 @@ onClick = ({ x, y }) => {
onSelect = ({ x, y, selectRelated }) => {
const d = getNodeByCoords(x, y);
let related = [];
let related = [];
if (d) {
if (selectRelated) {
related = edgeMap.get(d.id);
@ -637,6 +639,7 @@ onSetRootId = ({ x, y }) => {
const d = getNodeByCoords(x, y);
if (d) {
this.setRootId({ rootId: d.id });
send('setRootId', { node: d.id });
};
};