beremiz
Clone
Summary
Browse
Changes
Graph
SVGHMI: strip useless placeholder bitmap of HMI:Image in resulting xhtml
py2compat
17 months ago, Edouard Tisserant
cd5fbf238096
Parents
5a17b0e7a360
Children
2a5647b82666
SVGHMI: strip useless placeholder bitmap of HMI:Image in resulting xhtml
1 files changed, 12 insertions(+), 4 deletions(-)
+12
-4
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";
+ }
+}
+
+}