From 7ecb772c6c0fa347cb0d712065f3cff0eb91fdfb Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Fri, 10 May 2024 07:43:04 +0200 Subject: [PATCH] #5237 Alternating background --- cypress/platform/knsv2.html | 5 ++++- .../rendering-elements/clusters.js | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index 63fffdd35..7ee782bc3 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -73,7 +73,7 @@ -
+    
 stateDiagram
 NumLockOff --> NumLockOn : EvNumLockPressed
       
A:One Chimp --> B:Two Chimp --> C:Three + state InActive { + D + } } }
{ // add the rect let rect; if (node.useRough) { + const isAlt = node.classes.indexOf('statediagram-cluster-alt') >= 0; + console.log( + 'DAGA node in roundedWithTitle', + node.classes, + node.classes.indexOf('statediagram-cluster-alt'), + isAlt + ); const rc = rough.svg(shapeSvg); const roughOuterNode = node.rx || node.ry @@ -187,7 +194,10 @@ const roundedWithTitle = (parent, node) => { : rc.rectangle(x, y, width, height); rect = shapeSvg.insert(() => roughOuterNode); - const roughInnerNode = rc.rectangle(x, innerY, width, innerHeight); + const roughInnerNode = rc.rectangle(x, innerY, width, innerHeight, { + fill: isAlt ? 'lightgrey' : 'white', + fillStyle: isAlt ? 'hachure' : 'solid', + }); rect = shapeSvg.insert(() => roughOuterNode); innerRect = shapeSvg.insert(() => roughInnerNode); @@ -248,11 +258,8 @@ const divider = (parent, node) => { if (node.useRough) { const rc = rough.svg(shapeSvg); const roughNode = rc.rectangle(x, y, width, height, { - fill: 'grey', + fill: 'lightgrey', roughness: 0.5, - // bowing: 6, - // stroke: 'green', - // strokeWidth: 3, strokeLineDash: [5], });