# HG changeset patch # User Edouard Tisserant # Date 1589146843 -7200 # Node ID 64e603b84aa30b967d12de0a1d6de1ea5764b867 # Parent b5dccd0d99ac0591681496d6325b67238309260f SVGHMI: Exclude non-widget HMI:* labeled elements from hmi_widget. Namely : HMI:Page HMI:Lang and HMI:List have been excluded. diff -r b5dccd0d99ac -r 64e603b84aa3 svghmi/detachable_pages.ysl2 --- a/svghmi/detachable_pages.ysl2 Sun May 10 17:01:09 2020 +0200 +++ b/svghmi/detachable_pages.ysl2 Sun May 10 23:40:43 2020 +0200 @@ -131,7 +131,7 @@ ancestor-or-self::*[@id = $detachable_elements/@id]"""; | "«$desc/arg[1]/@value»": { - | widget: hmi_widgets["«@id»"], + //| widget: hmi_widgets["«@id»"], | bbox: [«$p/@x», «$p/@y», «$p/@w», «$p/@h»], if "$desc/path/@value" { if "count($desc/path/@index)=0" diff -r b5dccd0d99ac -r 64e603b84aa3 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Sun May 10 17:01:09 2020 +0200 +++ b/svghmi/gen_index_xhtml.xslt Sun May 10 23:40:43 2020 +0200 @@ -472,10 +472,6 @@ ": { - widget: hmi_widgets[" - - "], - bbox: [ , @@ -781,7 +777,7 @@ - + @@ -974,6 +970,8 @@ } + + @@ -986,7 +984,7 @@ var hmi_widgets = { - + } diff -r b5dccd0d99ac -r 64e603b84aa3 svghmi/widgets_common.ysl2 --- a/svghmi/widgets_common.ysl2 Sun May 10 17:01:09 2020 +0200 +++ b/svghmi/widgets_common.ysl2 Sun May 10 23:40:43 2020 +0200 @@ -21,7 +21,7 @@ } }; -template "svg:*", mode="hmi_elements" { +template "svg:*", mode="hmi_widgets" { const "widget", "func:widget(@id)"; const "eltid","@id"; const "args" foreach "$widget/arg" > "«@value»"`if "position()!=last()" > ,` @@ -117,9 +117,12 @@ } || +const "excluded_types", "str:split('Page Lang List')"; +const "excluded_ids","$parsed_widgets/widget[not(@type = $excluded_types)]/@id"; + emit "preamble:hmi-elements" { | var hmi_widgets = { - apply "$hmi_elements", mode="hmi_elements"; + apply "$hmi_elements[@id = $excluded_ids]", mode="hmi_widgets"; | } }