--- a/svghmi/gen_index_xhtml.xslt Tue Oct 20 00:23:52 2020 +0200
+++ b/svghmi/gen_index_xhtml.xslt Tue Oct 20 00:24:49 2020 +0200
@@ -1475,6 +1475,180 @@
+ <xsl:template mode="widget_class" match="widget[@type='Animate']"> + <xsl:text>class AnimateWidget extends Widget{ + <xsl:text> frequency = 5; + <xsl:text> start = false; + <xsl:text> widget_center = undefined; + <xsl:text> dispatch(value) { + <xsl:text> this.speed = value / 5; + <xsl:text> //reconfigure animation + <xsl:text> this.request_animate(); + <xsl:text> // change animation properties + <xsl:text> for(let child of this.element.children){ + <xsl:text> if(child.nodeName.startsWith("animate")){ + <xsl:text> if(this.speed != 0 && !this.start){ + <xsl:text> this.start = true; + <xsl:text> this.element.beginElement(); + <xsl:text> if(this.speed > 0){ + <xsl:text> child.setAttribute("dur", this.speed+"s"); + <xsl:text> else if(this.speed < 0){ + <xsl:text> child.setAttribute("dur", (-1)*this.speed+"s"); + <xsl:text> this.start = false; + <xsl:text> this.element.endElement(); + <xsl:text> let widget_pos = this.element.getBBox(); + <xsl:text> this.widget_center = [(widget_pos.x+widget_pos.width/2), (widget_pos.y+widget_pos.height/2)]; + <xsl:template mode="widget_defs" match="widget[@type='Animate']"> + <xsl:param name="hmi_element"/> + <xsl:template mode="widget_class" match="widget[@type='AnimateRotation']"> + <xsl:text>class AnimateRotationWidget extends Widget{ + <xsl:text> frequency = 5; + <xsl:text> widget_center = undefined; + <xsl:text> dispatch(value) { + <xsl:text> this.speed = value / 5; + <xsl:text> //reconfigure animation + <xsl:text> this.request_animate(); + <xsl:text> // change animation properties + <xsl:text> for(let child of this.element.children){ + <xsl:text> if(child.nodeName == "animateTransform"){ + <xsl:text> if(this.speed > 0){ + <xsl:text> child.setAttribute("dur", this.speed+"s"); + <xsl:text> child.setAttribute("from", "0 "+this.widget_center[0]+" "+this.widget_center[1]); + <xsl:text> child.setAttribute("to", "360 "+this.widget_center[0]+" "+this.widget_center[1]); + <xsl:text> else if(this.speed < 0){ + <xsl:text> child.setAttribute("dur", (-1)*this.speed+"s"); + <xsl:text> child.setAttribute("from", "360 "+this.widget_center[0]+" "+this.widget_center[1]); + <xsl:text> child.setAttribute("to", "0 "+this.widget_center[0]+" "+this.widget_center[1]); + <xsl:text> child.setAttribute("from", "0 "+this.widget_center[0]+" "+this.widget_center[1]); + <xsl:text> child.setAttribute("to", "0 "+this.widget_center[0]+" "+this.widget_center[1]); + <xsl:text> let widget_pos = this.element.getBBox(); + <xsl:text> this.widget_center = [(widget_pos.x+widget_pos.width/2), (widget_pos.y+widget_pos.height/2)]; + <xsl:template mode="widget_defs" match="widget[@type='AnimateRotation']"> + <xsl:param name="hmi_element"/> <xsl:template mode="widget_class" match="widget[@type='Back']">
<xsl:text>class BackWidget extends Widget{
@@ -1506,7 +1680,9 @@
<xsl:text> frequency = 5;
+ <xsl:text> state_plc = 0; + <xsl:text> state_hmi = 0; <xsl:text> plc_lock = false;
@@ -1518,65 +1694,89 @@
<xsl:text> dispatch(value) {
- <xsl:text> this.button_release();
+ <xsl:text> this.state_plc = value; + <xsl:text> if(this.plc_lock){ + <xsl:text> if(this.state_plc == 1){ + <xsl:text> this.apply_hmi_value(0, 0); + <xsl:text> this.plc_lock = false; + <xsl:text> //redraw button + <xsl:text> this.state_hmi = this.state_plc; + <xsl:text> this.request_animate(); - <xsl:text> on_mouse_down(evt) {
- <xsl:text> if (this.active_style && this.inactive_style) {
- <xsl:text> this.active_elt.setAttribute("style", this.active_style);
- <xsl:text> this.inactive_elt.setAttribute("style", "display:none");
- <xsl:text> this.apply_hmi_value(0, 1);
- <xsl:text> this.plc_lock = false;
- <xsl:text> on_mouse_up(evt) {
- <xsl:text> this.button_release();
- <xsl:text> button_release(){
- <xsl:text> if(!this.plc_lock){
- <xsl:text> this.plc_lock = true;
+ <xsl:text> if (this.active_style && this.inactive_style) { + <xsl:text> // redraw button on screen refresh + <xsl:text> if (this.state_hmi) { + <xsl:text> this.active_elt.setAttribute("style", this.active_style); + <xsl:text> this.inactive_elt.setAttribute("style", "display:none"); + <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style); + <xsl:text> this.active_elt.setAttribute("style", "display:none"); + <xsl:text> on_click(evt) { + <xsl:text> //set state and apply if plc is 0 + <xsl:text> this.plc_lock = true; + <xsl:text> if(this.state_plc == 0){ + <xsl:text> this.apply_hmi_value(0, 1);
- <xsl:text> if (this.active_style && this.inactive_style) {
- <xsl:text> this.active_elt.setAttribute("style", "display:none");
- <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style);
- <xsl:text> this.apply_hmi_value(0, 0);
+ <xsl:text> //redraw button + <xsl:text> this.request_animate(); + <xsl:text> on_press(evt) { + <xsl:text> //set graphic + <xsl:text> this.state_hmi = 1; + <xsl:text> //redraw button + <xsl:text> this.request_animate(); @@ -1598,9 +1798,9 @@
- <xsl:text> this.element.setAttribute("onmousedown", "hmi_widgets["+this.element_id+"].on_mouse_down(evt)");
- <xsl:text> this.element.setAttribute("onmouseup", "hmi_widgets["+this.element_id+"].on_mouse_up(evt)");
+ <xsl:text> this.element.setAttribute("onclick", "hmi_widgets['"+this.element_id+"'].on_click(evt)"); + <xsl:text> this.element.setAttribute("onmousedown", "hmi_widgets['"+this.element_id+"'].on_press(evt)"); @@ -1738,7 +1938,7 @@
<xsl:text> handle_pos = undefined;
- <xsl:text> svg_dist = undefined;
+ <xsl:text> curr_value = 0; @@ -1750,13 +1950,47 @@
<xsl:text> dispatch(value) {
+ <xsl:text> let [min,max,start,totallength] = this.range; + <xsl:text> //save current value inside widget + <xsl:text> this.curr_value = value; + <xsl:text> //check if in range + <xsl:text> if (this.curr_value > max){ + <xsl:text> this.curr_value = max; + <xsl:text> this.apply_hmi_value(0, this.curr_value); + <xsl:text> else if (this.curr_value < min){ + <xsl:text> this.curr_value = min; + <xsl:text> this.apply_hmi_value(0, this.curr_value); <xsl:text> if(this.value_elt)
<xsl:text> this.value_elt.textContent = String(value);
- <xsl:text> this.update_DOM(value, this.handle_elt);
+ <xsl:text> //don't update if draging and setpoint ghost doesn't exist + <xsl:text> if(!this.drag || (this.setpoint_elt != undefined)){ + <xsl:text> this.update_DOM(value, this.handle_elt); @@ -1774,6 +2008,8 @@
+ <xsl:text> // show or hide ghost if exists <xsl:text> if(this.setpoint_elt != undefined){
<xsl:text> if(this.last_drag!= this.drag){
@@ -1800,6 +2036,8 @@
<xsl:text> on_release(evt) {
+ <xsl:text> //unbind events <xsl:text> window.removeEventListener("touchmove", this.on_bound_drag, true);
<xsl:text> window.removeEventListener("mousemove", this.on_bound_drag, true);
@@ -1812,12 +2050,20 @@
<xsl:text> window.removeEventListener("touchcancel", this.bound_on_release, true);
+ <xsl:text> //reset drag flag <xsl:text> if(this.drag){
<xsl:text> this.drag = false;
+ <xsl:text> // get final position <xsl:text> this.update_position(evt);
@@ -1826,10 +2072,14 @@
+ <xsl:text> //ignore drag event for X amount of time and if not selected <xsl:text> if(this.enTimer && this.drag){
<xsl:text> this.update_position(evt);
<xsl:text> this.enTimer = false;
@@ -1930,37 +2180,35 @@
<xsl:text> if(fi<fiEnd){
- <xsl:text> this.svg_dist=(fi)/(fiEnd)*(this.range[1]-this.range[0]);
+ <xsl:text> this.curr_value=(fi)/(fiEnd)*(this.range[1]-this.range[0]); <xsl:text> else if(fiEnd<fi && fi<fiEnd+minMax){
- <xsl:text> this.svg_dist = this.range[1];
+ <xsl:text> this.curr_value = this.range[1]; - <xsl:text> this.svg_dist = this.range[0];
+ <xsl:text> this.curr_value = this.range[0];
- <xsl:text> this.apply_hmi_value(0, Math.ceil(this.svg_dist));
- <xsl:text> // update ghost cursor
- <xsl:text> if(this.setpoint_elt != undefined){
- <xsl:text> this.request_animate();
+ <xsl:text> //apply value to hmi + <xsl:text> this.apply_hmi_value(0, Math.ceil(this.curr_value)); + <xsl:text> //redraw handle + <xsl:text> this.request_animate(); @@ -1972,7 +2220,21 @@
- <xsl:text> this.update_DOM(this.svg_dist, this.setpoint_elt);
+ <xsl:text> // redraw handle on screen refresh + <xsl:text> // check if setpoint(ghost) handle exsist otherwise update main handle + <xsl:text> if(this.setpoint_elt != undefined){ + <xsl:text> this.update_DOM(this.curr_value, this.setpoint_elt); + <xsl:text> this.update_DOM(this.curr_value, this.handle_elt); @@ -1980,24 +2242,40 @@
<xsl:text> on_select(evt){
+ <xsl:text> //enable drag flag and timer <xsl:text> this.drag = true;
<xsl:text> this.enTimer = true;
+ <xsl:text> //bind events <xsl:text> window.addEventListener("touchmove", this.on_bound_drag, true);
<xsl:text> window.addEventListener("mousemove", this.on_bound_drag, true);
- <xsl:text> window.addEventListener("mouseup", this.bound_on_release, true)
+ <xsl:text> window.addEventListener("mouseup", this.bound_on_release, true); <xsl:text> window.addEventListener("touchend", this.bound_on_release, true);
<xsl:text> window.addEventListener("touchcancel", this.bound_on_release, true);
+ <xsl:text> //update postion on mouse press <xsl:text> this.update_position(evt);
+ <xsl:text> //prevent next events + <xsl:text> evt.stopPropagation(); @@ -2074,13 +2352,21 @@
- <xsl:text> //init events
+ <xsl:text> this.handle_elt.addEventListener("mousedown", this.bound_on_select); <xsl:text> this.element.addEventListener("mousedown", this.bound_on_select);
<xsl:text> this.element.addEventListener("touchstart", this.bound_on_select);
+ <xsl:text> //touch recognised as page drag without next command + <xsl:text> document.body.addEventListener("touchstart", function(e){}, false); + <xsl:text> //save ghost style + <xsl:text> //save ghost style <xsl:text> if(this.setpoint_elt != undefined){
@@ -2092,22 +2378,6 @@
- <xsl:text> window.addEventListener("touchmove", hmi_widgets[this.element_id].update_position.bind(this));
- <xsl:text> window.addEventListener("mousemove", hmi_widgets[this.element_id].update_position.bind(this));
- <xsl:text> window.addEventListener("mouseup", hmi_widgets[this.element_id].on_release.bind(this))
- <xsl:text> window.addEventListener("touchend", hmi_widgets[this.element_id].on_release.bind(this));
- <xsl:text> window.addEventListener("touchcancel", hmi_widgets[this.element_id].on_release.bind(this));
@@ -2124,13 +2394,66 @@
<xsl:call-template name="defs_by_labels">
<xsl:with-param name="hmi_element" select="$hmi_element"/>
<xsl:with-param name="labels">
- <xsl:text>value min max</xsl:text>
+ <xsl:text>value min max setpoint</xsl:text> <xsl:with-param name="mandatory" select="'no'"/>
+ <xsl:template mode="widget_class" match="widget[@type='CustomHtml']"> + <xsl:text>class CustomHtmlWidget extends Widget{ + <xsl:text> frequency = 5; + <xsl:text> widget_size = undefined; + <xsl:text> dispatch(value) { + <xsl:text> this.request_animate(); + <xsl:text> this.widget_size = this.container_elt.getBBox(); + <xsl:text> this.element.innerHTML ='<foreignObject x="'+ + <xsl:text> this.widget_size.x+'" y="'+this.widget_size.y+ + <xsl:text> '" width="'+this.widget_size.width+'" height="'+this.widget_size.height+'"> '+ + <xsl:text> this.code_elt.textContent+ + <xsl:text> ' </foreignObject>'; + <xsl:template mode="widget_defs" match="widget[@type='CustomHtml']"> + <xsl:param name="hmi_element"/> + <xsl:call-template name="defs_by_labels"> + <xsl:with-param name="hmi_element" select="$hmi_element"/> + <xsl:with-param name="labels"> + <xsl:text>container code</xsl:text> <xsl:template mode="widget_class" match="widget[@type='Display']">
<xsl:text>class DisplayWidget extends Widget{
@@ -2162,7 +2485,9 @@
<xsl:when test="@type='HMI_STRING'">
- <xsl:otherwise>0</xsl:otherwise>
<xsl:if test="position()!=last()">
@@ -3501,7 +3826,7 @@
<xsl:template mode="widget_class" match="widget[@type='JsonTable']">
<xsl:text>class JsonTableWidget extends Widget{
+ <xsl:text> cache = [100,50]; <xsl:text> do_http_request(...opt) {
@@ -3509,7 +3834,9 @@
<xsl:text> args: this.args,
- <xsl:text> vars: this.cache,
+ <xsl:text> range: this.cache[1], + <xsl:text> position: this.cache[2], <xsl:text> visible: this.visible,
@@ -3848,6 +4175,8 @@
<xsl:text> this.apply_hmi_value(2, position);
+ <xsl:text> this.apply_hmi_value(3, this.visible); <xsl:text> console.log(range,position,jdata);
<xsl:apply-templates mode="json_table_render_except_comments" select="$data_elt">
@@ -4756,7 +5085,11 @@
<xsl:text> handle_orig = undefined;
- <xsl:text> scroll_size = 10;
+ <xsl:text> scroll_size = undefined; + <xsl:text> scroll_range = 0; + <xsl:text> scroll_visible = 7; <xsl:text> min_size = 0.07;
@@ -4774,17 +5107,59 @@
- <xsl:text> dispatch(value) {
- <xsl:text> //save current value inside widget
- <xsl:text> this.curr_value = value;
- <xsl:text> if(this.value_elt)
- <xsl:text> this.value_elt.textContent = String(value);
+ <xsl:text> dispatch(value,oldval, index) { + <xsl:text> if (index == 0){ + <xsl:text> let [min,max,start,totallength] = this.range; + <xsl:text> //save current value inside widget + <xsl:text> this.curr_value = value; + <xsl:text> //check if in range + <xsl:text> if (this.curr_value > max){ + <xsl:text> this.curr_value = max; + <xsl:text> this.apply_hmi_value(0, this.curr_value); + <xsl:text> else if (this.curr_value < min){ + <xsl:text> this.curr_value = min; + <xsl:text> this.apply_hmi_value(0, this.curr_value); + <xsl:text> if(this.value_elt) + <xsl:text> this.value_elt.textContent = String(value); + <xsl:text> else if(index == 1){ + <xsl:text> this.scroll_range = value; + <xsl:text> this.set_scroll(); + <xsl:text> else if(index == 2){ + <xsl:text> this.scroll_visible = value; + <xsl:text> this.set_scroll(); @@ -4792,7 +5167,35 @@
<xsl:text> if(!this.drag || (this.setpoint_elt != undefined)){
- <xsl:text> this.update_DOM(value, this.handle_elt);
+ <xsl:text> this.update_DOM(this.curr_value, this.handle_elt); + <xsl:text> set_scroll(){ + <xsl:text> //check if range is bigger than visible and set scroll size + <xsl:text> if(this.scroll_range > this.scroll_visible){ + <xsl:text> this.scroll_size = this.scroll_range - this.scroll_visible; + <xsl:text> this.range[0] = 0; + <xsl:text> this.range[1] = this.scroll_size; + <xsl:text> this.scroll_size = 1; + <xsl:text> this.range[0] = 0; + <xsl:text> this.range[1] = 1; @@ -4946,7 +5349,7 @@
- <xsl:text> window.removeEventListener("mouseup", this.bound_on_release, true)
+ <xsl:text> window.removeEventListener("mouseup", this.bound_on_release, true); <xsl:text> window.removeEventListener("touchend", this.bound_on_release, true);
@@ -5138,7 +5541,7 @@
- <xsl:text> //check if in range
+ <xsl:text> //check if in range and apply <xsl:text> if (this.curr_value > max){
@@ -5152,8 +5555,6 @@
<xsl:text> this.apply_hmi_value(0, this.curr_value);
@@ -5208,7 +5609,7 @@
- <xsl:text> window.addEventListener("mouseup", this.bound_on_release, true)
+ <xsl:text> window.addEventListener("mouseup", this.bound_on_release, true); <xsl:text> window.addEventListener("touchend", this.bound_on_release, true);
@@ -5264,10 +5665,14 @@
<xsl:text> evt.stopPropagation();
<xsl:text> //set min max value if not defined
@@ -5286,6 +5691,8 @@
<xsl:text> // save initial parameters
<xsl:text> this.range_elt.style.strokeMiterlimit="0";
@@ -5318,7 +5725,13 @@
<xsl:text> this.element.addEventListener("touchstart", this.bound_on_select);
+ <xsl:text> //touch recognised as page drag without next command + <xsl:text> document.body.addEventListener("touchstart", function(e){}, false); + <xsl:text> //save ghost style <xsl:text> if(this.setpoint_elt != undefined){
@@ -5425,25 +5838,11 @@
<xsl:text> dispatch(value) {
- <xsl:text> if(this.state != value){
- <xsl:text> this.state = value;
- <xsl:text> if (this.state) {
- <xsl:text> this.active_elt.setAttribute("style", this.active_style);
- <xsl:text> this.inactive_elt.setAttribute("style", "display:none");
- <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style);
- <xsl:text> this.active_elt.setAttribute("style", "display:none");
+ <xsl:text> this.state = value; + <xsl:text> //redraw toggle button + <xsl:text> this.request_animate(); @@ -5451,42 +5850,72 @@
<xsl:text> on_click(evt) {
+ <xsl:text> //toggle state and apply <xsl:text> if (this.state) {
- <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style);
- <xsl:text> this.active_elt.setAttribute("style", "display:none");
<xsl:text> this.state = 0;
- <xsl:text> this.active_elt.setAttribute("style", this.active_style);
- <xsl:text> this.inactive_elt.setAttribute("style", "display:none");
<xsl:text> this.state = 1;
<xsl:text> this.apply_hmi_value(0, this.state);
+ <xsl:text> //redraw toggle button + <xsl:text> this.request_animate(); + <xsl:text> // redraw toggle button on screen refresh + <xsl:text> if (this.state) { + <xsl:text> this.active_elt.setAttribute("style", this.active_style); + <xsl:text> this.inactive_elt.setAttribute("style", "display:none"); + <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style); + <xsl:text> this.active_elt.setAttribute("style", "display:none"); - <xsl:text> this.active_style = this.active_elt.style.cssText;
- <xsl:text> this.inactive_style = this.inactive_elt.style.cssText;
+ <xsl:text> this.active_style = this.active_elt ? this.active_elt.style.cssText : undefined; + <xsl:text> this.inactive_style = this.inactive_elt ? this.inactive_elt.style.cssText : undefined; + <xsl:text> if (this.active_style && this.inactive_style) { + <xsl:text> this.active_elt.setAttribute("style", "display:none"); + <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style); <xsl:text> this.element.setAttribute("onclick", "hmi_widgets['"+this.element_id+"'].on_click(evt)");
- <xsl:text> this.inactive_elt.setAttribute("style", this.inactive_style);
- <xsl:text> this.active_elt.setAttribute("style", "display:none");
@@ -5499,6 +5928,7 @@
<xsl:with-param name="labels">
<xsl:text>active inactive</xsl:text>
+ <xsl:with-param name="mandatory" select="'no'"/> --- a/svghmi/widget_circularslider.ysl2 Tue Oct 20 00:23:52 2020 +0200
+++ b/svghmi/widget_circularslider.ysl2 Tue Oct 20 00:24:49 2020 +0200
@@ -7,16 +7,33 @@
+ let [min,max,start,totallength] = this.range; + //save current value inside widget + this.curr_value = value; + if (this.curr_value > max){ + this.apply_hmi_value(0, this.curr_value); + else if (this.curr_value < min){ + this.apply_hmi_value(0, this.curr_value); this.value_elt.textContent = String(value);
- this.update_DOM(value, this.handle_elt);
+ //don't update if draging and setpoint ghost doesn't exist + if(!this.drag || (this.setpoint_elt != undefined)){ + this.update_DOM(value, this.handle_elt); @@ -25,6 +42,7 @@
let tip = this.range_elt.getPointAtLength(length);
elt.setAttribute('transform',"translate("+(tip.x-this.handle_pos.x)+","+(tip.y-this.handle_pos.y)+")");
+ // show or hide ghost if exists if(this.setpoint_elt != undefined){
if(this.last_drag!= this.drag){
@@ -38,21 +56,28 @@
window.removeEventListener("touchmove", this.on_bound_drag, true);
window.removeEventListener("mousemove", this.on_bound_drag, true);
window.removeEventListener("mouseup", this.bound_on_release, true)
window.removeEventListener("touchend", this.bound_on_release, true);
window.removeEventListener("touchcancel", this.bound_on_release, true);
this.update_position(evt);
+ //ignore drag event for X amount of time and if not selected if(this.enTimer && this.drag){
this.update_position(evt);
setTimeout("{hmi_widgets['"+this.element_id+"'].enTimer = true;}", 100);
@@ -103,40 +128,54 @@
//get handle distance from mouse position
- this.svg_dist=(fi)/(fiEnd)*(this.range[1]-this.range[0]);
+ this.curr_value=(fi)/(fiEnd)*(this.range[1]-this.range[0]); else if(fiEnd<fi && fi<fiEnd+minMax){
- this.svg_dist = this.range[1];
+ this.curr_value = this.range[1]; - this.svg_dist = this.range[0];
+ this.curr_value = this.range[0];
- this.apply_hmi_value(0, Math.ceil(this.svg_dist));
+ this.apply_hmi_value(0, Math.ceil(this.curr_value));
- if(this.setpoint_elt != undefined){
- this.request_animate();
+ this.request_animate(); - this.update_DOM(this.svg_dist, this.setpoint_elt);
+ // redraw handle on screen refresh + // check if setpoint(ghost) handle exsist otherwise update main handle + if(this.setpoint_elt != undefined){ + this.update_DOM(this.curr_value, this.setpoint_elt); + this.update_DOM(this.curr_value, this.handle_elt); + //enable drag flag and timer window.addEventListener("touchmove", this.on_bound_drag, true);
window.addEventListener("mousemove", this.on_bound_drag, true);
- window.addEventListener("mouseup", this.bound_on_release, true)
+ window.addEventListener("mouseup", this.bound_on_release, true); window.addEventListener("touchend", this.bound_on_release, true);
window.addEventListener("touchcancel", this.bound_on_release, true);
+ //update postion on mouse press this.update_position(evt);
@@ -175,23 +214,19 @@
this.bound_on_release = this.on_release.bind(this);
this.on_bound_drag = this.on_drag.bind(this);
+ this.handle_elt.addEventListener("mousedown", this.bound_on_select); this.element.addEventListener("mousedown", this.bound_on_select);
this.element.addEventListener("touchstart", this.bound_on_select);
+ //touch recognised as page drag without next command + document.body.addEventListener("touchstart", function(e){}, false); if(this.setpoint_elt != undefined){
this.setpoint_style = this.setpoint_elt.getAttribute("style");
this.setpoint_elt.setAttribute("style", "display:none");
- window.addEventListener("touchmove", hmi_widgets[this.element_id].update_position.bind(this));
- window.addEventListener("mousemove", hmi_widgets[this.element_id].update_position.bind(this));
- window.addEventListener("mouseup", hmi_widgets[this.element_id].on_release.bind(this))
- window.addEventListener("touchend", hmi_widgets[this.element_id].on_release.bind(this));
- window.addEventListener("touchcancel", hmi_widgets[this.element_id].on_release.bind(this));
@@ -199,6 +234,6 @@
template "widget[@type='CircularSlider']", mode="widget_defs" {
- optional_labels("value min max");
+ optional_labels("value min max setpoint"); --- a/svghmi/widget_jsontable.ysl2 Tue Oct 20 00:23:52 2020 +0200
+++ b/svghmi/widget_jsontable.ysl2 Tue Oct 20 00:24:49 2020 +0200
@@ -3,11 +3,12 @@
template "widget[@type='JsonTable']", mode="widget_class"
class JsonTableWidget extends Widget{
do_http_request(...opt) {
+ position: this.cache[2], @@ -218,6 +219,7 @@
| let [range,position,jdata] = janswer;
| this.apply_hmi_value(1, range);
| this.apply_hmi_value(2, position);
+ | this.apply_hmi_value(3, this.visible); | console.log(range,position,jdata);
apply "$data_elt", mode="json_table_render_except_comments" {
with "expressions","$initexpr_ns";
--- a/svghmi/widget_slider.ysl2 Tue Oct 20 00:23:52 2020 +0200
+++ b/svghmi/widget_slider.ysl2 Tue Oct 20 00:24:49 2020 +0200
@@ -6,7 +6,9 @@
+ scroll_size = undefined; @@ -15,16 +17,51 @@
handle_click = undefined;
- //save current value inside widget
- this.curr_value = value;
+ dispatch(value,oldval, index) { + let [min,max,start,totallength] = this.range; + //save current value inside widget + this.curr_value = value;
- this.value_elt.textContent = String(value);
+ if (this.curr_value > max){ + this.apply_hmi_value(0, this.curr_value); + else if (this.curr_value < min){ + this.apply_hmi_value(0, this.curr_value); + this.value_elt.textContent = String(value); + this.scroll_range = value; + this.scroll_visible = value; //don't update if draging and setpoint ghost doesn't exist
if(!this.drag || (this.setpoint_elt != undefined)){
- this.update_DOM(value, this.handle_elt);
+ this.update_DOM(this.curr_value, this.handle_elt); + //check if range is bigger than visible and set scroll size + if(this.scroll_range > this.scroll_visible){ + this.scroll_size = this.scroll_range - this.scroll_visible; + this.range[1] = this.scroll_size; @@ -101,7 +138,7 @@
window.removeEventListener("touchmove", this.on_bound_drag, true);
window.removeEventListener("mousemove", this.on_bound_drag, true);
- window.removeEventListener("mouseup", this.bound_on_release, true)
+ window.removeEventListener("mouseup", this.bound_on_release, true); window.removeEventListener("touchend", this.bound_on_release, true);
window.removeEventListener("touchcancel", this.bound_on_release, true);
@@ -197,14 +234,13 @@
this.curr_value=Math.ceil((html_dist/range_length)*(this.range[1]-this.range[0])+this.range[0]);
+ //check if in range and apply if (this.curr_value > max){
else if (this.curr_value < min){
this.apply_hmi_value(0, this.curr_value);
@@ -232,7 +268,7 @@
window.addEventListener("touchmove", this.on_bound_drag, true);
window.addEventListener("mousemove", this.on_bound_drag, true);
- window.addEventListener("mouseup", this.bound_on_release, true)
+ window.addEventListener("mouseup", this.bound_on_release, true); window.addEventListener("touchend", this.bound_on_release, true);
window.addEventListener("touchcancel", this.bound_on_release, true);
@@ -260,8 +296,10 @@
//set min max value if not defined
@@ -271,6 +309,7 @@
Number(this.max_elt.textContent) :
this.args.length >= 2 ? this.args[1] : 100;
// save initial parameters
this.range_elt.style.strokeMiterlimit="0";
this.range = [min, max, this.range_elt.getPointAtLength(0),this.range_elt.getTotalLength()];
@@ -287,7 +326,10 @@
this.handle_elt.addEventListener("mousedown", this.bound_on_select);
this.element.addEventListener("mousedown", this.bound_on_select);
this.element.addEventListener("touchstart", this.bound_on_select);
+ //touch recognised as page drag without next command + document.body.addEventListener("touchstart", function(e){}, false); if(this.setpoint_elt != undefined){
this.setpoint_style = this.setpoint_elt.getAttribute("style");
this.setpoint_elt.setAttribute("style", "display:none");
--- a/tests/svghmi/py_ext_0@py_ext/pyfile.xml Tue Oct 20 00:23:52 2020 +0200
+++ b/tests/svghmi/py_ext_0@py_ext/pyfile.xml Tue Oct 20 00:24:49 2020 +0200
@@ -30,8 +30,9 @@
def render_POST(self, request):
newstr = request.content.getvalue()
newdata = json.loads(newstr)
- vars = newdata[u'vars']
+ range_feedback = newdata[u'range'] + slider_position = newdata[u'position'] visible = newdata[u'visible']
options = newdata[u'options']
@@ -40,14 +41,11 @@
if action == "onClick[acknowledge]":
AlarmIndex[int(alarmid)][2] = "ack"
- svars = (vars + [0,0])[:3]
- range_feedback = svars[1]
- slider_position = svars[2]
- answer = self.renderTable(range_feedback, slider_position, visible, *(args+svars[3:]))
+ answer = self.renderTable(range_feedback, slider_position, visible) janswer = json.dumps(answer)
- def renderTable(self, old_range, old_position, visible, *options):
+ def renderTable(self, old_range, old_position, visible): delta = new_range - visible
new_position = 0 if delta <= 0 else delta if old_position > delta else old_position
--- a/tests/svghmi/svghmi_0@svghmi/svghmi.svg Tue Oct 20 00:23:52 2020 +0200
+++ b/tests/svghmi/svghmi_0@svghmi/svghmi.svg Tue Oct 20 00:24:49 2020 +0200
@@ -16,7 +16,7 @@
sodipodi:docname="svghmi.svg"
- inkscape:version="0.92.3 (2405546, 2018-03-11)">
+ inkscape:version="0.92.5 (0.92.5+68)"> @@ -197,16 +197,16 @@
inkscape:document-units="px"
- inkscape:current-layer="g1384"
+ inkscape:current-layer="hmi0" - inkscape:zoom="1.0913159"
- inkscape:cx="-911.00114"
- inkscape:cy="181.96708"
- inkscape:window-width="1800"
- inkscape:window-height="836"
+ inkscape:zoom="2.1826317" + inkscape:cx="-408.38959" + inkscape:cy="176.28106" + inkscape:window-width="1863" + inkscape:window-height="1176" inkscape:window-maximized="1"
inkscape:guide-bbox="true" />
@@ -5223,6 +5223,9 @@
inkscape:label="HMI:VarInit:100@.range" />
+ inkscape:label="HMI:VarInit:7@.visibleAlarms" style="color:#000000;fill:#4d4d4d"
@@ -5549,32 +5552,53 @@
- transform="matrix(0.5,0,0,0.5,-774.48108,252.30551)">
- style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bc8f8f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- inkscape:label="cursor" />
+ inkscape:label="HMI:Slider@.position@.range@.alarmVisible"> + transform="matrix(0.620824,0,0,0.5,-963.61047,260.72872)" + inkscape:label="HMI:Input@.position"> + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ff6600;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.55573034px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="m 1175.2115,143.25263 34.1278,56.73732 h -68.2556 z" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + d="m 1175.2115,851.99803 34.1278,-54.90445 h -68.2556 z" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ff6600;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.51411843px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> - sodipodi:nodetypes="cccc"
+ style="opacity:0;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00058591px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M -234.01102,648.56465 V 371.89445" inkscape:connector-curvature="0"
- d="m 1175.2115,371.25263 34.1278,34.74552 h -68.2556 z"
- style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bc8f8f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- inkscape:label="backward" />
- style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#bc8f8f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="m 1175.2115,635.99803 34.1278,-34.7453 h -68.2556 z"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccc"
- inkscape:label="forward" />
+ inkscape:label="range" /> + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.30952382;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.03627348px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + inkscape:label="background" /> + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ff6600;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.11429262px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + inkscape:label="handle" /> @@ -6029,16 +6053,6 @@
sodipodi:role="line">Status</tspan></text>
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- y="513.61072">TODO</tspan></text>
transform="matrix(0.57180538,0,0,0.57180538,226.35945,-231.48695)"
inkscape:label="HMI:Jump:AlarmPage"
--- a/tests/svghmi_v2/svghmi_0@svghmi/svghmi.svg Tue Oct 20 00:23:52 2020 +0200
+++ b/tests/svghmi_v2/svghmi_0@svghmi/svghmi.svg Tue Oct 20 00:24:49 2020 +0200
@@ -92,10 +92,10 @@
sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="-173.06414 : 591.30354 : 1"
+ inkscape:vp_x="-470.06413 : 851.30353 : 1" inkscape:vp_y="0 : 1319.7648 : 0"
- inkscape:vp_z="1192.2994 : 402.34211 : 1"
- inkscape:persp3d-origin="671.58536 : 432.93175 : 1"
+ inkscape:vp_z="895.29941 : 662.3421 : 1" + inkscape:persp3d-origin="374.58537 : 692.93174 : 1" @@ -109,9 +109,9 @@
inkscape:current-layer="hmi0"
- inkscape:zoom="1.4142136"
- inkscape:cx="462.89448"
- inkscape:cy="318.79031"
+ inkscape:cx="379.07861" + inkscape:cy="265.09897" inkscape:window-width="2503"
inkscape:window-height="1416"
@@ -129,8 +129,8 @@
inkscape:label="HMI:Page:Home"
sodipodi:insensitive="true" />
- inkscape:label="HMI:Slider@/PUMP0/SLOTH"
- transform="matrix(7.5590552,0,0,7.5590552,-710.78539,551.61779)"
+ inkscape:label="HMI:Slider@/SPEED" + transform="matrix(7.5590552,0,0,7.5590552,-780.78539,561.61779)" style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
@@ -189,15 +189,15 @@
inkscape:label="HMI:Input@/SOMEPLCGLOBAL">
- transform="scale(1.1201068,0.89277203)"
+ transform="scale(1.1201068,0.89277202)"
style="font-style:normal;font-weight:normal;font-size:124.08008575px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.10200214px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="stroke-width:3.10200214px"
sodipodi:role="line">Test</tspan></text>
@@ -205,8 +205,8 @@
style="opacity:0;fill:#de2cc9;fill-opacity:1;stroke:none;stroke-width:3.45667744"
@@ -1366,7 +1366,7 @@
inkscape:label="HMI:CircularBar@/PUMP0/SLOTH"
- transform="matrix(0.39840034,0,0,0.35920948,224.04409,96.134885)">
+ transform="matrix(0.39840034,0,0,0.35920948,-97.955902,106.13488)"> @@ -1410,7 +1410,7 @@
inkscape:label="HMI:CircularSlider@/PUMP0/SLOTH"
- transform="matrix(0.45707797,0,0,0.45707797,330.74411,340.99474)">
+ transform="matrix(0.45707797,0,0,0.45707797,33.744118,80.994747)"> d="M 970.29569,399.76446 A 184.25998,167.44942 0 0 1 866.26395,284.77467 184.25998,167.44942 0 0 1 904.10823,139.93753"
@@ -1438,43 +1438,43 @@
sodipodi:type="inkscape:box3dside"
inkscape:box3dsidetype="6"
- d="m 919.8592,371.09874 v 61.75093 l 51.05152,-25.59855 V 348.7668 Z"
- points="919.8592,432.84967 970.91072,407.25112 970.91072,348.7668 919.8592,371.09874 "
+ d="m 919.8592,371.09875 v 61.75093 l 51.05152,-25.59855 v -58.48432 z" + points="919.8592,432.84968 970.91072,407.25113 970.91072,348.76681 919.8592,371.09875 " style="fill:#353564;fill-rule:evenodd;stroke:none;stroke-width:21.82598114px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
sodipodi:type="inkscape:box3dside"
inkscape:box3dsidetype="13"
- d="m 919.8592,432.84967 49.77111,22.08625 49.54589,-27.39008 -48.26548,-20.29472 z"
- points="969.63031,454.93592 1019.1762,427.54584 970.91072,407.25112 919.8592,432.84967 "
+ d="m 919.8592,432.84968 49.77112,22.08624 49.54588,-27.39007 -48.26548,-20.29472 z" + points="969.63032,454.93592 1019.1762,427.54585 970.91072,407.25113 919.8592,432.84968 " style="fill:#afafde;fill-rule:evenodd;stroke:none;stroke-width:21.82598114px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
sodipodi:type="inkscape:box3dside"
inkscape:box3dsidetype="11"
- d="m 970.91072,348.7668 48.26548,18.93314 v 59.8459 l -48.26548,-20.29472 z"
- points="1019.1762,367.69994 1019.1762,427.54584 970.91072,407.25112 970.91072,348.7668 "
+ d="m 970.91072,348.76681 48.26548,18.93313 v 59.84591 l -48.26548,-20.29472 z" + points="1019.1762,367.69994 1019.1762,427.54585 970.91072,407.25113 970.91072,348.76681 " style="fill:#e9e9ff;fill-rule:evenodd;stroke:none;stroke-width:21.82598114px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
sodipodi:type="inkscape:box3dside"
inkscape:box3dsidetype="5"
- d="m 919.8592,371.09874 49.77111,20.56633 49.54589,-23.96513 -48.26548,-18.93314 z"
- points="969.63031,391.66507 1019.1762,367.69994 970.91072,348.7668 919.8592,371.09874 "
+ d="m 919.8592,371.09875 49.77112,20.56633 49.54588,-23.96514 -48.26548,-18.93313 z" + points="969.63032,391.66508 1019.1762,367.69994 970.91072,348.76681 919.8592,371.09875 " style="fill:#4d4d9f;fill-rule:evenodd;stroke:none;stroke-width:21.82598114px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
sodipodi:type="inkscape:box3dside"
inkscape:box3dsidetype="14"
- d="m 969.63031,391.66507 v 63.27085 l 49.54589,-27.39008 v -59.8459 z"
- points="969.63031,454.93592 1019.1762,427.54584 1019.1762,367.69994 969.63031,391.66507 "
+ d="m 969.63032,391.66508 v 63.27084 l 49.54588,-27.39007 v -59.84591 z" + points="969.63032,454.93592 1019.1762,427.54585 1019.1762,367.69994 969.63032,391.66508 " style="fill:#d7d7ff;fill-rule:evenodd;stroke:none;stroke-width:21.82598114px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
sodipodi:type="inkscape:box3dside"
inkscape:box3dsidetype="3"
- d="m 919.8592,371.09874 49.77111,20.56633 v 63.27085 L 919.8592,432.84967 Z"
- points="969.63031,391.66507 969.63031,454.93592 919.8592,432.84967 919.8592,371.09874 "
+ d="m 919.8592,371.09875 49.77112,20.56633 v 63.27084 L 919.8592,432.84968 Z" + points="969.63032,391.66508 969.63032,454.93592 919.8592,432.84968 919.8592,371.09875 " style="fill:#8686bf;fill-rule:evenodd;stroke:none;stroke-width:21.82598114px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1" />
@@ -1492,27 +1492,7 @@
style="fill:#ff00ca;fill-opacity:1;stroke:none;stroke-width:2.25346255px;stroke-opacity:1">000</tspan></text>
- inkscape:label="HMI:ToggleButton@/TOGGLE2">
- inkscape:label="inactive"
- style="opacity:1;fill:#ff0015;fill-opacity:1;stroke:none" />
- inkscape:label="active"
- style="opacity:1;fill:#00ff03;fill-opacity:1;stroke:none" />
- transform="translate(-67.175138,-1.0606552)"
+ transform="translate(-289.17513,-33.060654)" inkscape:label="HMI:ToggleButton@/TOGGLE1">
@@ -1533,16 +1513,16 @@
style="opacity:1;fill:#00ff03;fill-opacity:1;stroke:none" />
- transform="translate(63.639613)"
- inkscape:label="HMI:ToggleButton@/TOGGLE">
+ transform="translate(-287.05529,41.033314)" + inkscape:label="HMI:Button@/TOGGLE">
style="opacity:1;fill:#00ff03;fill-opacity:1;stroke:none" />
inkscape:label="inactive"
@@ -1550,7 +1530,90 @@
style="opacity:1;fill:#ff0015;fill-opacity:1;stroke:none" />
+ inkscape:label="HMI:AnimateRotation@/SPEED"> + style="fill:#ececec;fill-opacity:1;stroke:#ff0000;stroke-width:2.95733476;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="opacity:0;fill:#ececec;fill-opacity:1;stroke:none;stroke-width:3.69000006;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + sodipodi:nodetypes="sssssss" + inkscape:connector-curvature="0" + d="m 719.75481,403.83452 c 1.9692,9.54564 9.417,-4.37059 26.6751,-4.06174 27.2477,0.48762 30.0401,21.24497 35.5749,12.81174 6.6594,-10.14673 12.6699,-22.7446 14.75,-33.25 13.5509,-68.43783 -46.4736,-97.18589 -72,-91.49999 -40.88858,9.10778 -49.54078,47.21136 -31.99998,71.75 13.16428,18.41615 23.37448,26.67508 26.99998,44.24999 z" + style="fill:#fd0000;fill-opacity:1;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + sodipodi:nodetypes="sssssss" + inkscape:connector-curvature="0" + d="m 789.45321,432.25975 c -8.9783,-3.79302 -1.7422,10.23457 -11.7862,24.27224 -15.8577,22.16324 -34.5364,12.68834 -30.7308,22.03024 4.5788,11.24 11.5443,23.3361 19.0162,31.0083 48.6752,49.9808 106.3992,16.8549 116.1963,-7.3926 15.6932,-38.84015 -10.7791,-67.57972 -40.9378,-67.05341 -22.634,0.39495 -35.2273,4.11873 -51.7577,-2.86477 z" + style="fill:#fd0000;fill-opacity:1;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + sodipodi:nodetypes="sssssss" + inkscape:connector-curvature="0" + d="m 730.85671,475.85643 c 7.5732,-6.1355 -8.2092,-6.3552 -15.8654,-21.82523 -12.0882,-24.42445 5.0646,-36.44319 -4.9688,-37.48364 -12.07218,-1.25186 -26.02318,-0.80116 -36.30958,2.17903 -67.0109,19.41388 -64.9607,85.93594 -48.1806,105.99474 26.8787,32.1304 64.6969,22.3051 78.43058,-4.5502 10.3071,-20.1549 12.9505,-33.0184 26.8938,-44.3147 z" + style="fill:#fd0000;fill-opacity:1;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + attributeName="transform" + repeatCount="indefinite" /> + inkscape:label="HMI:CustomHtml"> + inkscape:label="container" + style="opacity:0.29800002;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1.11057007" /> + transform="scale(0.57360572,1.7433578)" + style="font-style:normal;font-weight:normal;font-size:9.29032898px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.87096828px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve"><tspan + style="stroke-width:0.87096828px" + sodipodi:role="line"> <img xmlns="http://www.w3.org/1999/xhtml" id="img" src="https://thumbs.gfycat.com/ImpoliteSoupyKakapo-size_restricted.gif" width="100%" height="80%" /></tspan><tspan + style="stroke-width:0.87096828px" + sodipodi:role="line"> <a xmlns="http://www.w3.org/1999/xhtml" href='www.gmail.com'>Gmail</a></tspan><tspan + style="stroke-width:0.87096828px" + sodipodi:role="line"> <p xmlns="http://www.w3.org/1999/xhtml">Koj kurac to ne dela</p></tspan><tspan + style="stroke-width:0.87096828px" + sodipodi:role="line" /></text>