10000 Fix single cone by etpinard · Pull Request #2647 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix single cone #2647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup 'name' hover label part for cones
  • Loading branch information
etpinard committed May 21, 2018
commit faf519fd30fb5904037f6c546536c0c5f1b9e696
2 changes: 1 addition & 1 deletion src/traces/cone/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fromMesh3d.forEach(function(k) {
attrs.hoverinfo = extendFlat({}, baseAttrs.hoverinfo, {
editType: 'calc',
flags: ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'],
dflt: 'x+y+z+norm+text'
dflt: 'x+y+z+norm+text+name'
});

module.exports = attrs;
24 changes: 24 additions & 0 deletions test/jasmine/tests/cone_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,28 @@ describe('@gl Test cone interactions', function() {
.catch(failTest)
.then(done);
});

it('should display hover labels (multi-trace case)', function(done) {
var fig = Lib.extendDeep({}, require('@mocks/gl3d_cone-single.json'));
fig.layout.margin = {l: 0, t: 0, r: 0, b: 0};
fig.layout.width = 400;
fig.layout.height = 400;

function _hover() {
mouseEvent('mouseover', 245, 230);
return delay(20)();
}

Plotly.plot(gd, fig)
.then(delay(20))
.then(_hover)
.then(function() {
assertHoverLabelContent({
nums: ['x: 1', 'y: 1', 'z: 1', 'norm: 1.41'].join('\n'),
name: 'blue cone'
});
})
.catch(failTest)
.then(done);
});
});
0