Skip to content

Commit 99de97e

Browse files
authored
Update index.js
update and clean as suggested
1 parent a48213c commit 99de97e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/plots/ternary/index.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
var d3 = require('@plotly/d3');
4-
53
var Ternary = require('./ternary');
64

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

8179
exports.updateFx = function(gd) {
8280
var fullLayout = gd._fullLayout;
83-
var dragmode = fullLayout.dragmode;
84-
var toplevel = d3.select(gd).selectAll('g.toplevel');
85-
86-
toplevel.style('cursor', dragmode === 'pan' ? 'move' : 'crosshair');
81+
82+
fullLayout._ternarylayer
83+
.selectAll('g.toplevel')
84+
.style('cursor', fullLayout.dragmode === 'pan' ? 'move' : 'crosshair');
8785
};

0 commit comments

Comments
 (0)