Skip to content

Fix missing cursor for ternary plot #7057

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 9 commits into from
Jul 22, 2024
Merged
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
Update index.js
update and clean as suggested
  • Loading branch information
Lexachoc authored Jul 22, 2024
commit 99de97e95ac1e17abe0ced86b97f6812a70a8fb5
10 changes: 4 additions & 6 deletions src/plots/ternary/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

var d3 = require('@plotly/d3');

var Ternary = require('./ternary');

var getSubplotCalcData = require('../../plots/get_data').getSubplotCalcData;
Expand Down Expand Up @@ -80,8 +78,8 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)

exports.updateFx = function(gd) {
var fullLayout = gd._fullLayout;
var dragmode = fullLayout.dragmode;
var toplevel = d3.select(gd).selectAll('g.toplevel');

toplevel.style('cursor', dragmode === 'pan' ? 'move' : 'crosshair');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run npm run lint -- --fix and commit the changes.

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I hope I'm doing it correctly.

fullLayout._ternarylayer
.selectAll('g.toplevel')
.style('cursor', fullLayout.dragmode === 'pan' ? 'move' : 'crosshair');
};