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({
|
||||
id: "view-zoom-controls",
|
||||
align: "right",
|
||||
element: $('<span>'+
|
||||
'<button class="red-ui-footer-button" id="btn-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="btn-zoom-in"><i class="fa fa-plus"></i></button>'+
|
||||
element: $('<span class="button-group">'+
|
||||
'<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="red-ui-view-zoom-zero"><i class="fa fa-circle-o"></i></button>'+
|
||||
'<button class="red-ui-footer-button" id="red-ui-view-zoom-in"><i class="fa fa-plus"></i></button>'+
|
||||
'</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');
|
||||
$("#btn-zoom-zero").on("click", function() {zoomZero();});
|
||||
RED.popover.tooltip($("#btn-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset');
|
||||
$("#btn-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-out"),RED._('actions.zoom-out'),'core:zoom-out');
|
||||
$("#red-ui-view-zoom-zero").on("click", function() {zoomZero();});
|
||||
RED.popover.tooltip($("#red-ui-view-zoom-zero"),RED._('actions.zoom-reset'),'core:zoom-reset');
|
||||
$("#red-ui-view-zoom-in").on("click", function() {zoomIn();});
|
||||
RED.popover.tooltip($("#red-ui-view-zoom-in"),RED._('actions.zoom-in'),'core:zoom-in');
|
||||
$("#chart").on("DOMMouseScroll mousewheel", function (evt) {
|
||||
if ( evt.altKey ) {
|
||||
evt.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user