Skip to content

Commit 703d12b

Browse files
authored
Merge pull request #5398 from plotly/gl2d-cleanup
Drop contourgl and pointcloud traces from the code and API
2 parents ecfa01e + 77ab257 commit 703d12b

33 files changed

+68
-1611
lines changed

lib/contourgl.js

-11
This file was deleted.

lib/index-gl2d.js

-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ var Plotly = require('./core');
1313
Plotly.register([
1414
require('./scattergl'),
1515
require('./splom'),
16-
require('./pointcloud'),
1716
require('./heatmapgl'),
18-
require('./contourgl'),
1917
require('./parcoords')
2018
]);
2119

lib/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Plotly.register([
4444
require('./scattergl'),
4545
require('./splom'),
4646

47-
require('./pointcloud'),
4847
require('./heatmapgl'),
4948

5049
require('./parcoords'),

lib/pointcloud.js

-11
This file was deleted.

package-lock.json

-187
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,13 @@
7979
"delaunay-triangulate": "^1.1.6",
8080
"fast-isnumeric": "^1.1.4",
8181
"gl-cone3d": "^1.5.2",
82-
"gl-contour2d": "^1.1.7",
8382
"gl-error3d": "^1.0.16",
8483
"gl-heatmap2d": "^1.1.0",
8584
"gl-line3d": "1.2.1",
8685
"gl-mat4": "^1.2.0",
8786
"gl-mesh3d": "^2.3.1",
8887
"gl-plot2d": "^1.4.5",
8988
"gl-plot3d": "^2.4.7",
90-
"gl-pointcloud2d": "^1.0.3",
9189
"gl-scatter3d": "^1.2.3",
9290
"gl-select-box": "^1.0.4",
9391
"gl-spikes2d": "^1.0.2",

src/components/images/draw.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ module.exports = function draw(gd) {
236236
subplot = allSubplots[i];
237237
var subplotObj = fullLayout._plots[subplot];
238238

239-
// filter out overlaid plots (which havd their images on the main plot)
240-
// and gl2d plots (which don't support below images, at least not yet)
239+
// filter out overlaid plots (which have their images on the main plot)
240+
// and heatmapgl plots (which don't support below images, at least not yet)
241241
if(!subplotObj.imagelayer) continue;
242242

243243
var imagesOnSubplot = subplotObj.imagelayer.selectAll('image')

src/components/modebar/manage.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function getButtonGroups(gd) {
8989
var hasGeo = fullLayout._has('geo');
9090
var hasPie = fullLayout._has('pie');
9191
var hasFunnelarea = fullLayout._has('funnelarea');
92-
var hasGL2D = fullLayout._has('gl2d');
92+
var hasHeatmapgl = fullLayout._has('gl2d');
9393
var hasTernary = fullLayout._has('ternary');
9494
var hasMapbox = fullLayout._has('mapbox');
9595
var hasPolar = fullLayout._has('polar');
@@ -124,7 +124,7 @@ function getButtonGroups(gd) {
124124
var resetGroup = [];
125125
var dragModeGroup = [];
126126

127-
if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasPolar > 1) {
127+
if((hasCartesian || hasHeatmapgl || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasPolar > 1) {
128128
// graphs with more than one plot types get 'union buttons'
129129
// which reset the view or toggle hover labels across all subplots.
130130
hoverGroup = ['toggleHover'];
@@ -140,7 +140,7 @@ function getButtonGroups(gd) {
140140
zoomGroup = ['zoomInMapbox', 'zoomOutMapbox'];
141141
hoverGroup = ['toggleHover'];
142142
resetGroup = ['resetViewMapbox'];
143-
} else if(hasGL2D) {
143+
} else if(hasHeatmapgl) {
144144
hoverGroup = ['hoverClosestGl2d'];
145145
} else if(hasPie) {
146146
hoverGroup = ['hoverClosestPie'];
@@ -161,14 +161,14 @@ function getButtonGroups(gd) {
161161
hoverGroup = [];
162162
}
163163

164-
if((hasCartesian || hasGL2D) && !allAxesFixed) {
164+
if((hasCartesian || hasHeatmapgl) && !allAxesFixed) {
165165
zoomGroup = ['zoomIn2d', 'zoomOut2d', 'autoScale2d'];
166166
if(resetGroup[0] !== 'resetViews') resetGroup = ['resetScale2d'];
167167
}
168168

169169
if(hasGL3D) {
170170
dragModeGroup = ['zoom3d', 'pan3d', 'orbitRotation', 'tableRotation'];
171-
} else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
171+
} else if(((hasCartesian || hasHeatmapgl) && !allAxesFixed) || hasTernary) {
172172
dragModeGroup = ['zoom2d', 'pan2d'];
173173
} else if(hasMapbox || hasGeo) {
174174
dragModeGroup = ['pan2d'];

src/plot_api/plot_schema.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,15 @@ function layoutHeadAttr(fullLayout, head) {
332332
_module = basePlotModules[i];
333333
if(_module.attrRegex && _module.attrRegex.test(head)) {
334334
// if a module defines overrides, these take precedence
335-
// initially this is to allow gl2d different editTypes from svg cartesian
335+
// initially this was to allow heatmapgl different editTypes from svg cartesian
336336
if(_module.layoutAttrOverrides) return _module.layoutAttrOverrides;
337337

338338
// otherwise take the first attributes we find
339339
if(!out && _module.layoutAttributes) out = _module.layoutAttributes;
340340
}
341341

342342
// a module can also override the behavior of base (and component) module layout attrs
343-
// again see gl2d for initial use case
343+
// again see heatmapgl for initial use case
344344
var baseOverrides = _module.baseLayoutAttrOverrides;
345345
if(baseOverrides && head in baseOverrides) return baseOverrides[head];
346346
}

src/plot_api/subroutines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function lsInner(gd) {
6868
exports.drawMainTitle(gd);
6969
ModeBar.manage(gd);
7070

71-
// _has('cartesian') means SVG specifically, not GL2D - but GL2D
71+
// _has('cartesian') means SVG specifically, not heatmapgl - but heatmapgl
7272
// can still get here because it makes some of the SVG structure
7373
// for shared features like selections.
7474
if(!fullLayout._has('cartesian')) {

src/plots/cartesian/axes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ axes.coerceRef = function(containerIn, containerOut, gd, attr, dflt, extraOption
102102
if(!extraOption) extraOption = dflt;
103103
axlist = axlist.concat(axlist.map(function(x) { return x + ' domain'; }));
104104

105-
// data-ref annotations are not supported in gl2d yet
105+
// data-ref annotations are not supported in heatmapgl yet
106106

107107
attrDef[refAttr] = {
108108
valType: 'enumerated',

src/plots/cartesian/include_components.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
3535
var xaList = subplots.xaxis;
3636
var yaList = subplots.yaxis;
3737
var cartesianList = subplots.cartesian;
38-
var hasCartesianOrGL2D = layoutOut._has('cartesian') || layoutOut._has('gl2d');
38+
var hasCartesianOrHeatmapgl = layoutOut._has('cartesian') || layoutOut._has('gl2d');
3939

4040
for(var i = 0; i < array.length; i++) {
4141
var itemi = array[i];
@@ -49,7 +49,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
4949
var hasXref = idRegex.x.test(xref);
5050
var hasYref = idRegex.y.test(yref);
5151
if(hasXref || hasYref) {
52-
if(!hasCartesianOrGL2D) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
52+
if(!hasCartesianOrHeatmapgl) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
5353

5454
var newAxis = false;
5555
if(hasXref && xaList.indexOf(xref) === -1) {

src/plots/plots.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,12 @@ plots.supplyDefaults = function(gd, opts) {
476476
// clean subplots and other artifacts from previous plot calls
477477
plots.cleanPlot(newFullData, newFullLayout, oldFullData, oldFullLayout);
478478

479-
var hadGL2D = !!(oldFullLayout._has && oldFullLayout._has('gl2d'));
480-
var hasGL2D = !!(newFullLayout._has && newFullLayout._has('gl2d'));
479+
var hadHeatmapgl = !!(oldFullLayout._has && oldFullLayout._has('gl2d'));
480+
var hasHeatmapgl = !!(newFullLayout._has && newFullLayout._has('gl2d'));
481481
var hadCartesian = !!(oldFullLayout._has && oldFullLayout._has('cartesian'));
482482
var hasCartesian = !!(newFullLayout._has && newFullLayout._has('cartesian'));
483-
var hadBgLayer = hadCartesian || hadGL2D;
484-
var hasBgLayer = hasCartesian || hasGL2D;
483+
var hadBgLayer = hadCartesian || hadHeatmapgl;
484+
var hasBgLayer = hasCartesian || hasHeatmapgl;
485485
if(hadBgLayer && !hasBgLayer) {
486486
// remove bgLayer
487487
oldFullLayout._bgLayer.remove();

0 commit comments

Comments
 (0)