Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 55d8f98

Browse filesBrowse files
authored
Merge pull request #7057 from Lexachoc/ternary_cursor_fix
Fix missing cursor for ternary plot
2 parents 7b8e80c + 7e9abcf commit 55d8f98
Copy full SHA for 55d8f98

File tree

3 files changed

+16
-0
lines changed
Filter options

3 files changed

+16
-0
lines changed

‎draftlogs/7057_fix.md

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Fix missing cursor for Ternary Plot[[#7057](https://github.com/plotly/plotly.js/pull/7057)],
2+
with thanks to @Lexachoc for the contribution!

‎src/plots/ternary/index.js

Copy file name to clipboardExpand all lines: src/plots/ternary/index.js
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,10 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
7575
}
7676
}
7777
};
78+
79+
exports.updateFx = function(gd) {
80+
var fullLayout = gd._fullLayout;
81+
fullLayout._ternarylayer
82+
.selectAll('g.toplevel')
83+
.style('cursor', fullLayout.dragmode === 'pan' ? 'move' : 'crosshair');
84+
};

‎src/plots/ternary/ternary.js

Copy file name to clipboardExpand all lines: src/plots/ternary/ternary.js
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function Ternary(options, fullLayout) {
3030
this.graphDiv = options.graphDiv;
3131
this.init(fullLayout);
3232
this.makeFramework(fullLayout);
33+
this.updateFx(fullLayout);
3334

3435
// unfortunately, we have to keep track of some axis tick settings
3536
// as ternary subplots do not implement the 'ticks' editType
@@ -97,6 +98,12 @@ proto.makeFramework = function(fullLayout) {
9798
Drawing.setClipUrl(_this.layers.grids, clipId, gd);
9899
};
99100

101+
proto.updateFx = function(fullLayout) {
102+
fullLayout._ternarylayer
103+
.selectAll('g.toplevel')
104+
.style('cursor', fullLayout.dragmode === 'pan' ? 'move' : 'crosshair');
105+
};
106+
100107
proto.updateLayers = function(ternaryLayout) {
101108
var _this = this;
102109
var layers = _this.layers;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.