mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Tidy zoom control statusBar widget
This commit is contained in:
parent
5e8279cf51
commit
10c818474c
@ -367,20 +367,20 @@ RED.view = (function() {
|
|||||||
RED.statusBar.add({
|
RED.statusBar.add({
|
||||||
id: "view-zoom-controls",
|
id: "view-zoom-controls",
|
||||||
align: "right",
|
align: "right",
|
||||||
element: $('<span>'+
|
element: $('<span class="button-group">'+
|
||||||
'<button class="red-ui-footer-button" id="btn-zoom-out"><i class="fa fa-minus"></i></button>'+
|
'<button class="red-ui-footer-button" id="red-ui-view-zoom-out"><i class="fa fa-minus"></i></button>'+
|
||||||
'<button class="red-ui-footer-button" id="btn-zoom-zero"><i class="fa fa-circle-o"></i></button>'+
|
'<button class="red-ui-footer-button" id="red-ui-view-zoom-zero"><i class="fa fa-circle-o"></i></button>'+
|
||||||
'<button class="red-ui-footer-button" id="btn-zoom-in"><i class="fa fa-plus"></i></button>'+
|
'<button class="red-ui-footer-button" id="red-ui-view-zoom-in"><i class="fa fa-plus"></i></button>'+
|
||||||
'</span>')
|
'</span>')
|
||||||
})
|
})
|
||||||
|
|
||||||
$("#btn-zoom-out").on("click", function() {zoomOut();});
|
$("#red-ui-view-zoom-out").on("click", function() {zoomOut();});
|
||||||
|
|
||||||
RED.popover.tooltip($("#btn-zoom-out"),RED._('actions.zoom-out'),'core:zoom-out');
|
RED.popover.tooltip($("#red-ui-view-zoom-out"),RED._('actions.zoom-out'),'core:zoom-out');
|
||||||
$("#btn-zoom-zero").on("click", function() {zoomZero();});
|
$("#red-ui-view-zoom-zero").on("click", function() {zoomZero();});
|
||||||
RED.popover.tooltip($("#btn-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset');
|
RED.popover.tooltip($("#red-ui-view-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset');
|
||||||
$("#btn-zoom-in").on("click", function() {zoomIn();});
|
$("#red-ui-view-zoom-in").on("click", function() {zoomIn();});
|
||||||
RED.popover.tooltip($("#btn-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in');
|
RED.popover.tooltip($("#red-ui-view-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in');
|
||||||
$("#chart").on("DOMMouseScroll mousewheel", function (evt) {
|
$("#chart").on("DOMMouseScroll mousewheel", function (evt) {
|
||||||
if ( evt.altKey ) {
|
if ( evt.altKey ) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user