From 923d0a827b40c3380872c31f2bd9d7a2e59fb249 Mon Sep 17 00:00:00 2001 From: Michael Leuschel <leuschel@uni-duesseldorf.de> Date: Tue, 1 Aug 2023 09:46:43 +0200 Subject: [PATCH] add new style JSON example file Signed-off-by: Michael Leuschel <leuschel@uni-duesseldorf.de> --- Button/button_new_style.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Button/button_new_style.json diff --git a/Button/button_new_style.json b/Button/button_new_style.json new file mode 100644 index 0000000..d079431 --- /dev/null +++ b/Button/button_new_style.json @@ -0,0 +1,26 @@ +{ + "svg": "button.svg", + "include": "button_extra.json", + "comment": "new style JSON format with multiple attributes per item", + "items": [ + { + "id": "button", + "stroke-width": "IF GET_IS_ENABLED(\"press_button\")=TRUE THEN 6 ELSE 1 END", + "fill": "IF button=TRUE THEN \"green\" ELSE \"red\" END" + }, + { + "id": "button", + "stroke-width": "IF GET_IS_ENABLED(\"press_button\")=TRUE THEN 6 ELSE 1 END", + "ignore": "true", + "comment": "stroke-width is now used in hover below" + } + ], + "events": [ + { + "id": "button", + "event": "toggle_button", + "hovers": [{ "attr":"stroke-width", "enter":"6", "leave":"1"}, + { "attr":"opacity", "enter":"0.8", "leave":"1.0"}] + } + ] +} -- GitLab