Skip to content

Commit b2a6fae

Browse files
committed
Fix scroll legend under Mac OS
1 parent 84f8abd commit b2a6fae

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

index.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,12 @@ <h4>Log sync</h4>
467467
<canvas width="0" height="0" id="stickCanvas"></canvas>
468468
<span class="log-open-legend-dialog glyphicon glyphicon-cog" data-toggle="tooltip" title="Show the legend"></span>
469469
</div>
470-
<div class="log-graph-config no-wheel">
471-
<h2 class="no-wheel">Legend
472-
<span class="log-close-legend-dialog glyphicon glyphicon-remove no-wheel" data-toggle="tooltip" title="Hide the legend"></span>
470+
<div class="log-graph-config">
471+
<h2>Legend
472+
<span class="log-close-legend-dialog glyphicon glyphicon-remove" data-toggle="tooltip" title="Hide the legend"></span>
473473
</h2>
474-
<div class="log-index no-wheel"></div>
475-
<div class="log-graph-legend no-wheel">
474+
<div class="log-index"></div>
475+
<div class="log-graph-legend">
476476
</div>
477477

478478
<div class="btn-group override-button-group" role="group">
@@ -499,7 +499,7 @@ <h2 class="no-wheel">Legend
499499
</button>
500500
</div>
501501

502-
<button type="button" class="btn btn-default btn-block open-graph-configuration-dialog no-wheel" data-toggle="tooltip" title="Setup chart pens">Graph setup</button>
502+
<button type="button" class="btn btn-default btn-block open-graph-configuration-dialog" data-toggle="tooltip" title="Setup chart pens">Graph setup</button>
503503
</div>
504504
<div class="mouseNotification"></div>
505505
</div>
@@ -1864,7 +1864,9 @@ <h4 class="modal-title">Shortcut Keys</h4>
18641864
<ul>
18651865
<li>
18661866
<span class="keys">
1867-
<div><img src="./images/glyphs/scrollwheel.svg" data-toggle="tooltip" title="Mouse Scroll Wheel" /></div>
1867+
<div class="key">Ctrl</div>
1868+
<div class="normal">+</div>
1869+
<img src="./images/glyphs/scrollwheel.svg" data-toggle="tooltip" title="Mouse Scroll Wheel" />
18681870
</span>
18691871
<div class="description">Adjust Smoothing of field in graph by hovering field in legend and scroll</div>
18701872
</li>

js/graph_legend.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ function GraphLegend(targetElem, config, onVisibilityChange, onNewSelectionChang
1414
for (i = 0; i < graphs.length; i++) {
1515
var
1616
graph = graphs[i],
17-
graphDiv = $('<div class="graph-legend no-wheel" id="' + i +'"><h3 class="graph-legend-group field-quick-adjust" graph="' + i + '"></h3><ul class="list-unstyled graph-legend-field-list no-wheel"></ul></div>'),
17+
graphDiv = $('<div class="graph-legend" id="' + i +'"><h3 class="graph-legend-group field-quick-adjust" graph="' + i + '"></h3><ul class="list-unstyled graph-legend-field-list"></ul></div>'),
1818
graphTitle = $("h3", graphDiv),
1919
fieldList = $("ul", graphDiv);
2020

2121
graphTitle.text(graph.label);
22-
graphTitle.prepend('<span class="glyphicon glyphicon-minus no-wheel"></span>');
22+
graphTitle.prepend('<span class="glyphicon glyphicon-minus"></span>');
2323

2424
for (j = 0; j < graph.fields.length; j++) {
2525
var
@@ -28,7 +28,7 @@ function GraphLegend(targetElem, config, onVisibilityChange, onNewSelectionChang
2828
nameElem = $('<span class="graph-legend-field-name field-quick-adjust" name="' + field.name + '" graph="' + i + '" field="' + j +'"></span>'),
2929
valueElem = $('<span class="graph-legend-field-value field-quick-adjust" name="' + field.name + '" graph="' + i + '" field="' + j +'"></span>'),
3030
settingsElem = $('<div class="graph-legend-field-settings field-quick-adjust" name="' + field.name + '" graph="' + i + '" field="' + j +'"></div>'),
31-
analyseElem = $('<span class="glyphicon glyphicon-equalizer no-wheel"></span>');
31+
analyseElem = $('<span class="glyphicon glyphicon-equalizer"></span>');
3232
li.append(nameElem);
3333
li.append(analyseElem);
3434
li.append(valueElem);

js/main.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,20 +1614,23 @@ function BlackboxLogViewer() {
16141614
if($(e.target).hasClass('field-quick-adjust')) {
16151615
var refreshRequired = false;
16161616

1617-
if(e.shiftKey) { // change zoom
1617+
if (e.shiftKey) { // change zoom
16181618
refreshRequired = changePenZoom(activeGraphConfig.getGraphs(), $(e.target).attr('graph'), $(e.target).attr('field'), (delta>=0))
1619-
} else if(e.altKey) { // change Expo
1619+
e.preventDefault();
1620+
} else if (e.altKey) { // change Expo
16201621
refreshRequired = changePenExpo(activeGraphConfig.getGraphs(), $(e.target).attr('graph'), $(e.target).attr('field'), (delta>=0))
1621-
} else { // Change smoothing
1622+
e.preventDefault();
1623+
} else if (e.ctrlKey){ // Change smoothing
16221624
refreshRequired = changePenSmoothing(activeGraphConfig.getGraphs(), $(e.target).attr('graph'), $(e.target).attr('field'), (delta>=0))
1625+
e.preventDefault();
16231626
}
16241627

16251628
if(refreshRequired) {
16261629
graph.refreshGraphConfig();
16271630
invalidateGraph();
16281631
mouseNotification.show($('.log-graph'), null, null, refreshRequired, 750, null, 'bottom-right', 0);
16291632
}
1630-
e.preventDefault();
1633+
16311634
return true;
16321635
}
16331636
}

0 commit comments

Comments
 (0)