Skip to content

Navigation Menu

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 2c51844

Browse filesBrowse files
authored
Merge pull request #7213 from plotly/drop-gl2d
Drop deprecated `pointcloud` and `heatmapgl` traces and `gl2d` subplots
2 parents e4b3591 + 6c94890 commit 2c51844
Copy full SHA for 2c51844

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

60 files changed

+389
-7577
lines changed

‎draftlogs/7213_remove.md

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]

‎lib/heatmapgl.js

Copy file name to clipboardExpand all lines: lib/heatmapgl.js
-3Lines changed: 0 additions & 3 deletions
This file was deleted.

‎lib/index-gl2d.js

Copy file name to clipboardExpand all lines: lib/index-gl2d.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Plotly.register([
66
// traces
77
require('./scattergl'),
88
require('./splom'),
9-
require('./pointcloud'),
10-
require('./heatmapgl'),
119
require('./parcoords'),
1210

1311
// transforms

‎lib/index-strict.js

Copy file name to clipboardExpand all lines: lib/index-strict.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Plotly.register([
3232
require('./choropleth'),
3333
require('../src/traces/scattergl/strict'),
3434
require('../src/traces/splom/strict'),
35-
require('./pointcloud'),
36-
require('./heatmapgl'),
3735
require('../src/traces/parcoords/strict'),
3836
require('./parcats'),
3937
require('./scattermapbox'),

‎lib/index.js

Copy file name to clipboardExpand all lines: lib/index.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Plotly.register([
3232
require('./choropleth'),
3333
require('./scattergl'),
3434
require('./splom'),
35-
require('./pointcloud'),
36-
require('./heatmapgl'),
3735
require('./parcoords'),
3836
require('./parcats'),
3937
require('./scattermapbox'),

‎lib/pointcloud.js

Copy file name to clipboardExpand all lines: lib/pointcloud.js
-3Lines changed: 0 additions & 3 deletions
This file was deleted.

‎src/components/fx/hover.js

Copy file name to clipboardExpand all lines: src/components/fx/hover.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ exports.loneHover = function loneHover(hoverItems, opts) {
160160
x1 += dx;
161161
y0 += dy;
162162
y1 += dy;
163-
} // TODO: handle heatmapgl
163+
}
164164

165165
eventData.bbox = {
166166
x0: x0 + gLeft,

‎src/components/images/draw.js

Copy file name to clipboardExpand all lines: src/components/images/draw.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ module.exports = function draw(gd) {
229229
var subplotObj = fullLayout._plots[subplot];
230230

231231
// filter out overlaid plots (which have their images on the main plot)
232-
// and gl2d plots (which don't support below images, at least not yet)
233232
if(!subplotObj.imagelayer) continue;
234233

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

‎src/components/modebar/buttons.js

Copy file name to clipboardExpand all lines: src/components/modebar/buttons.js
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -559,18 +559,6 @@ function handleGeo(gd, ev) {
559559
}
560560
}
561561

562-
modeBarButtons.hoverClosestGl2d = {
563-
name: 'hoverClosestGl2d',
564-
_cat: 'hoverclosest',
565-
title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },
566-
attr: 'hovermode',
567-
val: null,
568-
toggle: true,
569-
icon: Icons.tooltip_basic,
570-
gravity: 'ne',
571-
click: toggleHover
572-
};
573-
574562
modeBarButtons.hoverClosestPie = {
575563
name: 'hoverClosestPie',
576564
_cat: 'hoverclosest',

‎src/components/modebar/manage.js

Copy file name to clipboardExpand all lines: src/components/modebar/manage.js
+3-8Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ function getButtonGroups(gd) {
107107
var hasGeo = fullLayout._has('geo');
108108
var hasPie = fullLayout._has('pie');
109109
var hasFunnelarea = fullLayout._has('funnelarea');
110-
var hasGL2D = fullLayout._has('gl2d');
111110
var hasTernary = fullLayout._has('ternary');
112111
var hasMapbox = fullLayout._has('mapbox');
113112
var hasMap = fullLayout._has('map');
@@ -155,7 +154,7 @@ function getButtonGroups(gd) {
155154
var resetGroup = [];
156155
var dragModeGroup = [];
157156

158-
if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
157+
if((hasCartesian || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
159158
// graphs with more than one plot types get 'union buttons'
160159
// which reset the view or toggle hover labels across all subplots.
161160
hoverGroup = ['toggleHover'];
@@ -175,8 +174,6 @@ function getButtonGroups(gd) {
175174
zoomGroup = ['zoomInMap', 'zoomOutMap'];
176175
hoverGroup = ['toggleHover'];
177176
resetGroup = ['resetViewMap'];
178-
} else if(hasGL2D) {
179-
hoverGroup = ['hoverClosestGl2d'];
180177
} else if(hasPie) {
181178
hoverGroup = ['hoverClosestPie'];
182179
} else if(hasSankey) {
@@ -196,14 +193,14 @@ function getButtonGroups(gd) {
196193
hoverGroup = [];
197194
}
198195

199-
if((hasCartesian || hasGL2D) && !allAxesFixed) {
196+
if(hasCartesian && !allAxesFixed) {
200197
zoomGroup = ['zoomIn2d', 'zoomOut2d', 'autoScale2d'];
201198
if(resetGroup[0] !== 'resetViews') resetGroup = ['resetScale2d'];
202199
}
203200

204201
if(hasGL3D) {
205202
dragModeGroup = ['zoom3d', 'pan3d', 'orbitRotation', 'tableRotation'];
206-
} else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
203+
} else if((hasCartesian && !allAxesFixed) || hasTernary) {
207204
dragModeGroup = ['zoom2d', 'pan2d'];
208205
} else if(hasMapbox || hasMap || hasGeo) {
209206
dragModeGroup = ['pan2d'];
@@ -248,14 +245,12 @@ function getButtonGroups(gd) {
248245
enableHover('hoverClosestCartesian');
249246
enableHover('hoverClosestGeo');
250247
enableHover('hoverClosest3d');
251-
enableHover('hoverClosestGl2d');
252248
enableHover('hoverClosestPie');
253249
} else if(b === 'v1hovermode') {
254250
enableHover('hoverClosestCartesian');
255251
enableHover('hoverCompareCartesian');
256252
enableHover('hoverClosestGeo');
257253
enableHover('hoverClosest3d');
258-
enableHover('hoverClosestGl2d');
259254
enableHover('hoverClosestPie');
260255
}
261256
} else newList.push(b);

‎src/components/rangeslider/helpers.js

Copy file name to clipboardExpand all lines: src/components/rangeslider/helpers.js
+8-10Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ exports.makeData = function(fullLayout) {
1717
var margin = fullLayout.margin;
1818
var rangeSliderData = [];
1919

20-
if(!fullLayout._has('gl2d')) {
21-
for(var i = 0; i < axes.length; i++) {
22-
var ax = axes[i];
20+
for(var i = 0; i < axes.length; i++) {
21+
var ax = axes[i];
2322

24-
if(isVisible(ax)) {
25-
rangeSliderData.push(ax);
23+
if(isVisible(ax)) {
24+
rangeSliderData.push(ax);
2625

27-
var opts = ax[name];
28-
opts._id = name + ax._id;
29-
opts._height = (fullLayout.height - margin.b - margin.t) * opts.thickness;
30-
opts._offsetShift = Math.floor(opts.borderwidth / 2);
31-
}
26+
var opts = ax[name];
27+
opts._id = name + ax._id;
28+
opts._height = (fullLayout.height - margin.b - margin.t) * opts.thickness;
29+
opts._offsetShift = Math.floor(opts.borderwidth / 2);
3230
}
3331
}
3432

‎src/plot_api/plot_api.js

Copy file name to clipboardExpand all lines: src/plot_api/plot_api.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,8 +2191,6 @@ function _relayout(gd, aobj) {
21912191
!(vOld === 'lasso' || vOld === 'select'))
21922192
) {
21932193
flags.plot = true;
2194-
} else if(fullLayout._has('gl2d')) {
2195-
flags.plot = true;
21962194
} else if(valObject) editTypes.update(flags, valObject);
21972195
else flags.calc = true;
21982196

‎src/plot_api/plot_schema.js

Copy file name to clipboardExpand all lines: src/plot_api/plot_schema.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,14 @@ function layoutHeadAttr(fullLayout, head) {
324324
_module = basePlotModules[i];
325325
if(_module.attrRegex && _module.attrRegex.test(head)) {
326326
// if a module defines overrides, these take precedence
327-
// initially this is to allow gl2d different editTypes from svg cartesian
327+
// this is to allow different editTypes from svg cartesian
328328
if(_module.layoutAttrOverrides) return _module.layoutAttrOverrides;
329329

330330
// otherwise take the first attributes we find
331331
if(!out && _module.layoutAttributes) out = _module.layoutAttributes;
332332
}
333333

334334
// a module can also override the behavior of base (and component) module layout attrs
335-
// again see gl2d for initial use case
336335
var baseOverrides = _module.baseLayoutAttrOverrides;
337336
if(baseOverrides && head in baseOverrides) return baseOverrides[head];
338337
}

‎src/plot_api/subroutines.js

Copy file name to clipboardExpand all lines: src/plot_api/subroutines.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ function lsInner(gd) {
6363
exports.drawMainTitle(gd);
6464
ModeBar.manage(gd);
6565

66-
// _has('cartesian') means SVG specifically, not GL2D - but GL2D
67-
// can still get here because it makes some of the SVG structure
68-
// for shared features like selections.
66+
// _has('cartesian') means SVG specifically
6967
if(!fullLayout._has('cartesian')) {
7068
return Plots.previousPromises(gd);
7169
}

‎src/plots/cartesian/include_components.js

Copy file name to clipboardExpand all lines: src/plots/cartesian/include_components.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
2626
var xaList = subplots.xaxis;
2727
var yaList = subplots.yaxis;
2828
var cartesianList = subplots.cartesian;
29-
var hasCartesianOrGL2D = layoutOut._has('cartesian') || layoutOut._has('gl2d');
29+
var hasCartesian = layoutOut._has('cartesian');
3030

3131
for(var i = 0; i < array.length; i++) {
3232
var itemi = array[i];
@@ -40,7 +40,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
4040
var hasXref = idRegex.x.test(xref);
4141
var hasYref = idRegex.y.test(yref);
4242
if(hasXref || hasYref) {
43-
if(!hasCartesianOrGL2D) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
43+
if(!hasCartesian) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
4444

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

‎src/plots/cartesian/index.js

Copy file name to clipboardExpand all lines: src/plots/cartesian/index.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ exports.finalizeSubplots = function(layoutIn, layoutOut) {
4545
var xList = subplots.xaxis;
4646
var yList = subplots.yaxis;
4747
var spSVG = subplots.cartesian;
48-
var spAll = spSVG.concat(subplots.gl2d || []);
48+
var spAll = spSVG;
4949
var allX = {};
5050
var allY = {};
5151
var i, xi, yi;

‎src/plots/cartesian/layout_defaults.js

Copy file name to clipboardExpand all lines: src/plots/cartesian/layout_defaults.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
4646
// look for axes in the data
4747
for(i = 0; i < fullData.length; i++) {
4848
var trace = fullData[i];
49-
if(!traceIs(trace, 'cartesian') && !traceIs(trace, 'gl2d')) continue;
49+
if(!traceIs(trace, 'cartesian')) continue;
5050

5151
var xaName;
5252
if(trace.xaxis) {

‎src/plots/get_data.js

Copy file name to clipboardExpand all lines: src/plots/get_data.js
+1-13Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,10 @@ exports.getSubplotData = function getSubplotData(data, type, subplotId) {
9999
var subplotData = [];
100100
var trace, subplotX, subplotY;
101101

102-
if(type === 'gl2d') {
103-
var spmatch = subplotId.match(SUBPLOT_PATTERN);
104-
subplotX = 'x' + spmatch[1];
105-
subplotY = 'y' + spmatch[2];
106-
}
107-
108102
for(var i = 0; i < data.length; i++) {
109103
trace = data[i];
110104

111-
if(type === 'gl2d' && Registry.traceIs(trace, 'gl2d')) {
112-
if(trace[attr[0]] === subplotX && trace[attr[1]] === subplotY) {
113-
subplotData.push(trace);
114-
}
115-
} else {
116-
if(trace[attr] === subplotId) subplotData.push(trace);
117-
}
105+
if(trace[attr] === subplotId) subplotData.push(trace);
118106
}
119107

120108
return subplotData;

0 commit comments

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