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

Sign up
Appearance settings

Commit 8d7db15

Browse files
authored
Merge pull request #5438 from plotly/reimplement-pointcloud
Keep pointcloud trace type in v2 API
2 parents b854d61 + 7405557 commit 8d7db15

File tree

26 files changed

+829
-26
lines changed

26 files changed

+829
-26
lines changed

‎lib/index-gl2d.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var Plotly = require('./core');
1313
Plotly.register([
1414
require('./scattergl'),
1515
require('./splom'),
16+
require('./pointcloud'),
1617
require('./heatmapgl'),
1718
require('./parcoords')
1819
]);

‎lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Plotly.register([
4444
require('./scattergl'),
4545
require('./splom'),
4646

47+
require('./pointcloud'),
4748
require('./heatmapgl'),
4849

4950
require('./parcoords'),

‎lib/pointcloud.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Copyright 2012-2021, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
'use strict';
10+
11+
module.exports = require('../src/traces/pointcloud');

‎package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"gl-mesh3d": "^2.3.1",
8989
"gl-plot2d": "^1.4.5",
9090
"gl-plot3d": "^2.4.7",
91+
"gl-pointcloud2d": "^1.0.3",
9192
"gl-scatter3d": "^1.2.3",
9293
"gl-select-box": "^1.0.4",
9394
"gl-spikes2d": "^1.0.2",

‎src/components/images/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ module.exports = function draw(gd) {
237237
var subplotObj = fullLayout._plots[subplot];
238238

239239
// 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)
240+
// and gl2d 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

Lines changed: 5 additions & 5 deletions
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 hasHeatmapgl = fullLayout._has('gl2d');
92+
var hasGL2D = 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 || hasHeatmapgl || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasPolar > 1) {
127+
if((hasCartesian || hasGL2D || 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(hasHeatmapgl) {
143+
} else if(hasGL2D) {
144144
hoverGroup = ['hoverClosestGl2d'];
145145
} else if(hasPie) {
146146
hoverGroup = ['hoverClosestPie'];
@@ -161,14 +161,14 @@ function getButtonGroups(gd) {
161161
hoverGroup = [];
162162
}
163163

164-
if((hasCartesian || hasHeatmapgl) && !allAxesFixed) {
164+
if((hasCartesian || hasGL2D) && !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 || hasHeatmapgl) && !allAxesFixed) || hasTernary) {
171+
} else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
172172
dragModeGroup = ['zoom2d', 'pan2d'];
173173
} else if(hasMapbox || hasGeo) {
174174
dragModeGroup = ['pan2d'];

‎src/plot_api/plot_schema.js

Lines changed: 2 additions & 2 deletions
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 was to allow heatmapgl different editTypes from svg cartesian
335+
// initially this is to allow gl2d 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 heatmapgl for initial use case
343+
// again see gl2d for initial use case
344344
var baseOverrides = _module.baseLayoutAttrOverrides;
345345
if(baseOverrides && head in baseOverrides) return baseOverrides[head];
346346
}

‎src/plot_api/subroutines.js

Lines changed: 1 addition & 1 deletion
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 heatmapgl - but heatmapgl
71+
// _has('cartesian') means SVG specifically, not GL2D - but GL2D
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

Lines changed: 1 addition & 1 deletion
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 heatmapgl yet
105+
// data-ref annotations are not supported in gl2d yet
106106

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /