From a4729b8d8426b6c70446616cbbfcc02441abc3fd Mon Sep 17 00:00:00 2001 From: Peaceultime Date: Sat, 11 May 2024 00:50:59 +0200 Subject: [PATCH] Finish canvas fixes + add privates content ignore --- assets/canvas.css | 7 +--- components/CanvasEdge.vue | 12 +++++- components/CanvasNode.vue | 20 +++------- components/CanvasRenderer.client.vue | 57 ++++++++++++++++++++++------ nuxt.config.ts | 3 ++ 5 files changed, 67 insertions(+), 32 deletions(-) diff --git a/assets/canvas.css b/assets/canvas.css index cc6a277..ae5c233 100644 --- a/assets/canvas.css +++ b/assets/canvas.css @@ -809,7 +809,7 @@ body.is-mobile .canvas-node-resizer { .canvas-edges path.canvas-display-path { pointer-events: none; - stroke-width: calc(3px * var(--zoom-multiplier)); + stroke-width: calc(3px); stroke: rgb(var(--canvas-color)); fill: none; transition: stroke-width 100ms ease-out; @@ -817,7 +817,7 @@ body.is-mobile .canvas-node-resizer { .canvas-edges path.canvas-interaction-path { pointer-events: stroke; - stroke-width: calc(24px * var(--zoom-multiplier)); + stroke-width: calc(24px); stroke-linecap: round; stroke: transparent; fill: none; @@ -839,9 +839,6 @@ body.is-mobile .canvas-node-resizer { stroke-linecap: round; stroke-linejoin: round; stroke-width: 1px; - transform-box: fill-box; - transform: scale(var(--zoom-multiplier)); - transform-origin: center top; } .canvas-edges g.is-focused path.canvas-display-path, diff --git a/components/CanvasEdge.vue b/components/CanvasEdge.vue index ae5decc..c27c557 100644 --- a/components/CanvasEdge.vue +++ b/components/CanvasEdge.vue @@ -3,10 +3,12 @@ interface Props { path: { path: string; + from: { x: number; y: number }; to: { x: number; y: number }; side: 'bottom' | 'top' | 'left' | 'right'; }; color?: string; + label?: string; } const props = defineProps(); @@ -30,6 +32,12 @@ if (props.color !== undefined) { \ No newline at end of file diff --git a/components/CanvasNode.vue b/components/CanvasNode.vue index 9be16ae..187bd53 100644 --- a/components/CanvasNode.vue +++ b/components/CanvasNode.vue @@ -36,17 +36,14 @@ if(props.node.color !== undefined)