Skip to content

Commit

Permalink
rm unnecessary function call
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Feb 25, 2016
1 parent eebe7d0 commit 97a4542
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/plots/gl3d/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ function render(scene) {
return Axes.tickText(axis, axis.c2l(val), 'hover').text;
}

function makeEventData(xVal, yVal, zVal, trace, selection) {
return {points: [{
x: xVal,
y: yVal,
z: zVal,
data: trace._input,
fullData: trace,
curveNumber: trace.index,
pointNumber: selection.data.index
}]};
}

var oldEventData;

if(lastPicked !== null) {
Expand Down Expand Up @@ -112,7 +100,17 @@ function render(scene) {
});
}

var eventData = makeEventData(xVal, yVal, zVal, trace, selection);
var eventData = {
points: [{
x: xVal,
y: yVal,
z: zVal,
data: trace._input,
fullData: trace,
curveNumber: trace.index,
pointNumber: selection.data.index
}]
};

if(selection.buttons && selection.distance < 5) {
scene.graphDiv.emit('plotly_click', eventData);
Expand Down

0 comments on commit 97a4542

Please sign in to comment.