# HG changeset patch # User Edouard Tisserant <edouard@beremiz.fr> # Date 1736439040 -3600 # Node ID b312fd26a6a99ec8503a83e5ced31f80053736a8 # Parent 6a8fd46e998093b1dc8521c300639c515cab106d SVGHMI: strip useless placeholder bitmap of HMI:Image in resulting xhtml diff -r 6a8fd46e9980 -r b312fd26a6a9 svghmi/widget_image.ysl2 --- a/svghmi/widget_image.ysl2 Thu Jan 09 17:09:00 2025 +0100 +++ b/svghmi/widget_image.ysl2 Thu Jan 09 17:10:40 2025 +0100 @@ -28,8 +28,16 @@ | animate: function(){ | this.element.setAttribute('href', this.given_url); | }, - | - | init: function() { - | this.animate(); - | }, } + + +gen_index_xhtml { // following content is only available when generating xhtml file + +// strip inkscape embedded bitmap when it is meant to be replaced by HMI:Image widget +svgtmpl "svg:image[starts-with(@inkscape:label, 'HMI:Image')]", mode="inline_svg" { + xsl:copy { + apply "@*[not(contains(name(), 'href'))] | node()", mode="inline_svg"; + } +} + +}