From b89f56ba41a07c690f6341d7fc01580e282f21c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Espeute?= Date: Wed, 20 Nov 2024 10:29:03 +0100 Subject: [PATCH] [shgraph] Fix comment preventing move of child boxes --- bin/style.css | 28 +++++++++++-------- bin/style.less | 48 +++++++++++++++++--------------- hrt/shgraph/ShaderGlobalInput.hx | 7 ----- 3 files changed, 41 insertions(+), 42 deletions(-) diff --git a/bin/style.css b/bin/style.css index 05c46e12..a032ead2 100644 --- a/bin/style.css +++ b/bin/style.css @@ -2396,15 +2396,26 @@ input[type=checkbox]:checked:after { .graph-view .heaps-scene svg foreignObject .container input:hover { outline-color: rgba(114, 180, 255, 0.5); } -.graph-view .heaps-scene svg g.selected .outline { - stroke: #668fff; +.graph-view .heaps-scene svg g.box { + pointer-events: all; } -.graph-view .heaps-scene svg g.error .outline { - stroke: #ff6666; +.graph-view .heaps-scene svg g.box.comment { + pointer-events: none; } -.graph-view .heaps-scene svg g.box { +.graph-view .heaps-scene svg g.box.comment .head-box { + fill: rgba(80, 80, 80, 0.5); + pointer-events: all; +} +.graph-view .heaps-scene svg g.box.comment .resize { pointer-events: all; } +.graph-view .heaps-scene svg g.box.comment .outline { + stroke: rgba(80, 80, 80, 0.5); + stroke-width: 3; +} +.graph-view .heaps-scene svg g.box.selected .outline { + stroke: #668fff; +} .graph-view .heaps-scene svg .outline { fill: none; } @@ -2419,13 +2430,6 @@ input[type=checkbox]:checked:after { fill: rgba(0, 0, 0, 0); stroke: none; } -.graph-view .heaps-scene svg .comment .head-box { - fill: rgba(80, 80, 80, 0.5); -} -.graph-view .heaps-scene svg .comment .outline { - stroke: rgba(80, 80, 80, 0.5); - stroke-width: 3; -} .graph-view .heaps-scene svg .comment-title { display: inline-block; max-width: calc(100% - 30px); diff --git a/bin/style.less b/bin/style.less index ca449041..79e5def5 100644 --- a/bin/style.less +++ b/bin/style.less @@ -2722,19 +2722,33 @@ input[type=checkbox] { } g { - &.selected { - .outline { - stroke: #668fff; - } - } - &.error { - .outline { - stroke: #ff6666; - } - } - &.box { pointer-events: all; + + &.comment { + .head-box { + fill: rgba(80,80,80,0.5); + //stroke-width: 3; + pointer-events: all; + } + + .resize { + pointer-events: all; + } + + .outline { + stroke: rgba(80,80,80,0.5); + stroke-width: 3; + } + + pointer-events: none; + } + + &.selected { + .outline { + stroke: #668fff; + } + } } } @@ -2756,18 +2770,6 @@ input[type=checkbox] { stroke: none; } - .comment { - .head-box { - fill: rgba(80,80,80,0.5); - //stroke-width: 3; - } - - .outline { - stroke: rgba(80,80,80,0.5); - stroke-width: 3; - } - } - .comment-title { display: inline-block; max-width: calc(100% - 30px); diff --git a/hrt/shgraph/ShaderGlobalInput.hx b/hrt/shgraph/ShaderGlobalInput.hx index 251dc8e5..aebd1f5b 100644 --- a/hrt/shgraph/ShaderGlobalInput.hx +++ b/hrt/shgraph/ShaderGlobalInput.hx @@ -46,13 +46,6 @@ class ShaderGlobalInput extends ShaderNode { } } - // override function generate(ctx: NodeGenContext) { - // var input = ctx.getGlobalInput(globalInputs[variableIdx].g); - - // ctx.setOutput(0, input); - // ctx.addPreview(input); - // } - override public function getAliases(name: String, group: String, description: String) { var aliases = super.getAliases(name, group, description); for (i => input in globalInputs) {