feat: add simple performance tracker
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m23s

This commit is contained in:
2024-04-25 00:02:02 +02:00
parent 2de2560a57
commit f51f61df17
12 changed files with 408 additions and 224 deletions

View File

@ -7,7 +7,7 @@
import { getContext, onMount, setContext } from "svelte";
import Camera from "../Camera.svelte";
import GraphView from "./GraphView.svelte";
import type { Node, Node as NodeType, Socket } from "@nodes/types";
import type { Node, NodeId, Node as NodeType, Socket } from "@nodes/types";
import { NodeDefinitionSchema } from "@nodes/types";
import FloatingEdge from "../edges/FloatingEdge.svelte";
import {
@ -783,7 +783,7 @@
event.preventDefault();
isDragging = false;
if (!event.dataTransfer) return;
const nodeId = event.dataTransfer.getData("data/node-id");
const nodeId: NodeId = event.dataTransfer.getData("data/node-id");
if (nodeId) {
let mx = event.clientX - rect.x;
@ -805,7 +805,7 @@
}
const pos = projectScreenToWorld(mx, my);
graph.loadNode(nodeId).then(() => {
graph.load([nodeId]).then(() => {
graph.createNode({
type: nodeId,
props,