Skip to content

Commit

Permalink
Drag Inspector graphs horizontally with mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
cwilling committed Feb 1, 2018
1 parent a655acc commit 323a844
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/scripts/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,20 @@ function renderChart(options) {
select("#" + nameBase + "svg_" + longName).remove();
var jobElementGraphInspector = document.getElementById(svgParentName);

var svg = select(jobElementGraphInspector).append("svg");
var start_x;
var svgdrag = drag()
.on("start", function () {
start_x = event.x;
})
.on("drag", function () {
document.getElementById(svgParentName).scrollBy((start_x - event.x), 0);
start_x = event.x;
});

var svg = select(jobElementGraphInspector)
.append("svg")
.call(svgdrag);


var graphMargin;
var graphHeight;
Expand Down

0 comments on commit 323a844

Please sign in to comment.