svghmi/inline_svg.ysl2
branchsvghmi
changeset 2941 ef13a4007538
parent 2940 034b6ce4f885
child 2967 fc5fbf087b93
--- a/svghmi/inline_svg.ysl2	Sun Apr 19 10:48:34 2020 +0200
+++ b/svghmi/inline_svg.ysl2	Sun Apr 19 22:01:12 2020 +0200
@@ -34,9 +34,8 @@
     error > All units must be set to "px" in Inkscape's document properties
 }
 
-
-//////////////// Clone Unlinking
-
+////// Clone unlinking
+//
 // svg:use (inkscape's clones) inside a widgets are
 // replaced by real elements they refer in order to :
 //  - allow finding "needle" element in "meter" widget,
@@ -115,7 +114,13 @@
 const "result_svg" apply "/", mode="inline_svg";
 const "result_svg_ns", "exsl:node-set($result_svg)";
 
-emit "debug:inline-svg" {
+emit "preamble:inline-svg" {
+    | let id = document.getElementById.bind(document);
+    | var svg_root = id("«$svg/@id»");
+}
+
+emit "debug:clone-unlinking" {
+    |
     | Unlinked :
     foreach "$to_unlink"{
         | «@id»