Skip to content

Commit 7da71ae

Browse files
committed
make gl3d_cone-single really have 1 single cone
1 parent 4ae63a8 commit 7da71ae

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed
-6.67 KB
Loading

test/image/mocks/gl3d_cone-single.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@
22
"data": [
33
{
44
"type": "cone",
5-
"name": "blue cone",
65
"x": [1], "y": [1], "z": [1],
7-
"u": [1], "v": [1], "w": [0],
8-
"colorscale": "Blues",
9-
"showscale": false
10-
},
11-
{
12-
"type": "cone",
13-
"name": "green cone",
14-
"x": [3], "y": [3], "z": [3],
15-
"u": [0], "v": [0], "w": [2],
16-
"colorscale": "Greens",
17-
"showscale": false
6+
"u": [1], "v": [1], "w": [0]
187
}
198
],
209
"layout": {

test/jasmine/tests/cone_test.js

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,35 @@ describe('@gl Test cone interactions', function() {
267267
});
268268

269269
it('should display hover labels (multi-trace case)', function(done) {
270-
var fig = Lib.extendDeep({}, require('@mocks/gl3d_cone-single.json'));
271-
fig.layout.margin = {l: 0, t: 0, r: 0, b: 0};
272-
fig.layout.width = 400;
273-
fig.layout.height = 400;
274-
275270
function _hover() {
276271
mouseEvent('mouseover', 245, 230);
277272
return delay(20)();
278273
}
279274

280-
Plotly.plot(gd, fig)
275+
Plotly.plot(gd, [{
276+
type: 'cone',
277+
name: 'blue cone',
278+
x: [1], y: [1], z: [1],
279+
u: [1], v: [1], w: [0],
280+
colorscale: 'Blues',
281+
showscale: false
282+
}, {
283+
type: 'cone',
284+
name: 'green cone',
285+
x: [3], y: [3], z: [3],
286+
u: [0], v: [0], w: [2],
287+
colorscale: 'Greens',
288+
showscale: false
289+
}], {
290+
scene: {
291+
camera: {
292+
eye: {x: -0.76, y: 1.8, z: 0.92}
293+
}
294+
},
295+
margin: {l: 0, t: 0, r: 0, b: 0},
296+
width: 400,
297+
height: 400
298+
})
281299
.then(delay(20))
282300
.then(_hover)
283301
.then(function() {

0 commit comments

Comments
 (0)