Skip to content

Commit 92de017

Browse files
committed
put selection coords (not hoverlabel strings) to event data
1 parent b053629 commit 92de017

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/plots/gl3d/scene.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ function render(scene) {
9999

100100
var eventData = {
101101
points: [{
102-
x: xVal,
103-
y: yVal,
104-
z: zVal,
102+
x: selection.traceCoordinate[0],
103+
y: selection.traceCoordinate[1],
104+
z: selection.traceCoordinate[2],
105105
data: trace._input,
106106
fullData: trace,
107107
curveNumber: trace.index,

test/jasmine/tests/gl_plot_interact_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('Test gl3d plots', function() {
102102
.then(delay)
103103
.then(function() {
104104
assertHoverText('x: 140.72', 'y: −96.97', 'z: −96.97');
105-
assertEventData('140.72', '−96.97', '−96.97', 0, 2);
105+
assertEventData(140.72, -96.97, -96.97, 0, 2);
106106

107107
return Plotly.restyle(gd, {
108108
x: [['2016-01-11', '2016-01-12', '2017-01-01', '2017-02']]
@@ -173,7 +173,7 @@ describe('Test gl3d plots', function() {
173173
.then(_click)
174174
.then(delay)
175175
.then(function() {
176-
assertEventData('140.72', '−96.97', '−96.97', 0, 2);
176+
assertEventData(140.72, -96.97, -96.97, 0, 2);
177177
})
178178
.then(done);
179179
});

0 commit comments

Comments
 (0)