cockpit/themes/control/theme.js in cpee-2.1.47 vs cockpit/themes/control/theme.js in cpee-2.1.48
- old
+ new
@@ -251,10 +251,22 @@
}
}
new CustomMenu(e).contextmenu(menu);
} //}}}
+ function positionHandling(svgid) {
+ var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
+ if (vtarget.length > 0) {
+ if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
+ del_ui_pos(xml_node);
+ } else {
+ add_ui_pos(xml_node);
+ }
+ }
+ }
+
// Events
this.events.touchend = function(svgid, e) { // {{{
clearTimeout(self.presstimer);
} // }}}
this.events.touchstart = function(svgid, e, child, sibling) { // {{{
@@ -262,19 +274,11 @@
return false;
} // }}}
this.events.mousedown = function(svgid, e, child, sibling) { // {{{
if(e.button == 0) { // left-click
} else if(e.button == 1) { // middle-click
- var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
- var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
- if (vtarget.length > 0) {
- if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
- del_ui_pos(xml_node);
- } else {
- add_ui_pos(xml_node);
- }
- }
+ positionHandling(svgid);
} else if(e.button == 2) { // right-click
contextMenuHandling(svgid,e,child,sibling);
}
return false;
} // }}}
@@ -303,10 +307,12 @@
} else {
localStorage.removeItem('marked');
localStorage.removeItem('marked_from');
}
}
+ } else if (e && (e.shiftKey)) {
+ positionHandling(svgid);
} else {
self.adaptor.illustrator.get_elements().removeClass('marked');
localStorage.removeItem('marked');
localStorage.removeItem('marked_from');
@@ -1024,11 +1030,11 @@
if (vals.length > 0) {
valtext = ' (' + vals.join(', ') + ')';
} else {
valtext = '';
}
- var ret = [ { column: 'Label', value: 'measure: f = ' + $(node).attr('frequency') + ' Hz' + valtext } ];
+ var ret = [ { column: 'Label', value: 'measure: t = ' + $(node).attr('ctime') + ' ms' + valtext } ];
return ret;
},
'svg': self.adaptor.theme_dir + 'symbols/closed_loop_measuring.svg'
},//}}}
'description': self.adaptor.theme_dir + 'rngs/closed_loop_measuring.rng',
@@ -1106,10 +1112,10 @@
if (vals.length > 0) {
valtext = ' (' + vals.join(', ') + ')';
} else {
valtext = '';
}
- var ret = [ { column: 'Label', value: 'control: f = ' + $(node).attr('frequency') + ' Hz' + valtext } ];
+ var ret = [ { column: 'Label', value: 'control: t = ' + $(node).attr('ctime') + ' ms' + valtext } ];
return ret;
},
'svg': self.adaptor.theme_dir + 'symbols/closed_loop_control.svg'
},//}}}
'description': self.adaptor.theme_dir + 'rngs/closed_loop_control.rng',