# HG changeset patch
# User Edouard Tisserant
# Date 1657791322 -7200
# Node ID a8b6d5e1fda31c16f3324510eb9a7f51399daa88
# Parent 611fd1f44ce9836ef4656a99448f0e647ffdba0b
SVGHMI: add support for user JS script added in inkscape's document properties / scripting / embedded scripts.
diff -r 611fd1f44ce9 -r a8b6d5e1fda3 svghmi/gen_index_xhtml.ysl2
--- a/svghmi/gen_index_xhtml.ysl2 Wed Jul 13 14:40:42 2022 +0200
+++ b/svghmi/gen_index_xhtml.ysl2 Thu Jul 14 11:35:22 2022 +0200
@@ -102,6 +102,12 @@
include text svghmi.js
+ | \n//\n//\n// Declarations from SVG scripts (inkscape document properties) \n//\n//
+ foreach "/svg:svg/svg:script" {
+ |
+ | /* «@id» */
+ | «text()»
+ }
}
}
}
diff -r 611fd1f44ce9 -r a8b6d5e1fda3 tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg
--- a/tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg Wed Jul 13 14:40:42 2022 +0200
+++ b/tests/projects/svghmi/svghmi_0@svghmi/svghmi.svg Thu Jul 14 11:35:22 2022 +0200
@@ -18,6 +18,14 @@
viewBox="0 0 1280 720"
height="720"
width="1280">
+
@@ -125,12 +133,12 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:document-units="px"
- inkscape:current-layer="g5053"
+ inkscape:current-layer="hmi0"
showgrid="false"
units="px"
- inkscape:zoom="0.80184804"
- inkscape:cx="784.66046"
- inkscape:cy="-449.34319"
+ inkscape:zoom="0.14174805"
+ inkscape:cx="-1530.0784"
+ inkscape:cy="-1404.9832"
inkscape:window-width="1600"
inkscape:window-height="836"
inkscape:window-x="0"
@@ -8399,4 +8407,47 @@
sodipodi:role="line">Freq4
+
+
+
+
+ up
+
+