Skip to content

Commit 57ddadb

Browse files
committed
pass gd to basePlotModule.updateFx
.. in case (e.g. for splom) they need to lookup a few things in fullData and calcdata
1 parent 39b71bb commit 57ddadb

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

src/plot_api/subroutines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ exports.doModeBar = function(gd) {
520520

521521
for(var i = 0; i < fullLayout._basePlotModules.length; i++) {
522522
var updateFx = fullLayout._basePlotModules[i].updateFx;
523-
if(updateFx) updateFx(fullLayout);
523+
if(updateFx) updateFx(gd);
524524
}
525525

526526
return Plots.previousPromises(gd);

src/plots/cartesian/graph_interact.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,16 @@ exports.initInteractions = function initInteractions(gd) {
151151
gd._fullLayout._lasthover.onmousedown(evt);
152152
};
153153

154-
exports.updateFx(fullLayout);
154+
exports.updateFx(gd);
155155
};
156156

157157
// Minimal set of update needed on 'modebar' edits.
158158
// We only need to update the <g .draglayer> cursor style.
159159
//
160160
// Note that changing the axis configuration and/or the fixedrange attribute
161161
// should trigger a full initInteractions.
162-
exports.updateFx = function(fullLayout) {
162+
exports.updateFx = function(gd) {
163+
var fullLayout = gd._fullLayout;
163164
var cursor = fullLayout.dragmode === 'pan' ? 'move' : 'crosshair';
164165
setCursor(fullLayout._draggers, cursor);
165166
};

src/plots/geo/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ exports.clean = function(newFullData, newFullLayout, oldFullData, oldFullLayout)
7878
}
7979
};
8080

81-
exports.updateFx = function(fullLayout) {
81+
exports.updateFx = function(gd) {
82+
var fullLayout = gd._fullLayout;
8283
var subplotIds = fullLayout._subplots[GEO];
8384

8485
for(var i = 0; i < subplotIds.length; i++) {

src/plots/gl2d/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ exports.toSVG = function(gd) {
138138
}
139139
};
140140

141-
exports.updateFx = function(fullLayout) {
141+
exports.updateFx = function(gd) {
142+
var fullLayout = gd._fullLayout;
142143
var subplotIds = fullLayout._subplots.gl2d;
143144

144145
for(var i = 0; i < subplotIds.length; i++) {

src/plots/gl3d/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ exports.cleanId = function cleanId(id) {
129129
return SCENE + sceneNum;
130130
};
131131

132-
exports.updateFx = function(fullLayout) {
132+
exports.updateFx = function(gd) {
133+
var fullLayout = gd._fullLayout;
133134
var subplotIds = fullLayout._subplots[GL3D];
134135

135136
for(var i = 0; i < subplotIds.length; i++) {

src/plots/mapbox/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ function findAccessToken(gd, mapboxIds) {
152152
throw new Error(constants.noAccessTokenErrorMsg);
153153
}
154154

155-
exports.updateFx = function(fullLayout) {
155+
exports.updateFx = function(gd) {
156+
var fullLayout = gd._fullLayout;
156157
var subplotIds = fullLayout._subplots[MAPBOX];
157158

158159
for(var i = 0; i < subplotIds.length; i++) {

0 commit comments

Comments
 (0)