From 0fc3755d1b8d95b90dd84fc0e1018fdae05e9d11 Mon Sep 17 00:00:00 2001 From: marthasharkey Date: Tue, 18 Jun 2024 09:27:20 +0100 Subject: [PATCH] Disable clickThrough for get nodes for anything thats datatype is not JS_Object (#10286) --- .../components/visualizations/JSONVisualization.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/gui2/src/components/visualizations/JSONVisualization.vue b/app/gui2/src/components/visualizations/JSONVisualization.vue index 91cbd3ee0a4..4a4b6c7a152 100644 --- a/app/gui2/src/components/visualizations/JSONVisualization.vue +++ b/app/gui2/src/components/visualizations/JSONVisualization.vue @@ -17,6 +17,10 @@ const config = useVisualizationConfig() type ConstructivePattern = (placeholder: Ast.Owned) => Ast.Owned +const JSON_OBJECT_TYPE = 'Standard.Base.Data.Json.JS_Object' + +const isClickThroughEnabled = config.nodeType === JSON_OBJECT_TYPE + function projector(parentPattern: ConstructivePattern | undefined) { const style = { spaced: parentPattern !== undefined, @@ -53,7 +57,11 @@ function createProjection(path: (string | number)[][]) { @@ -63,4 +71,7 @@ function createProjection(path: (string | number)[][]) { font-family: var(--font-mono); padding: 8px; } +.viewonly { + pointer-events: none; +}