Skip to content

Commit 7405557

Browse files
committed
reimplement pointcloud trace type
1 parent be47021 commit 7405557

25 files changed

+822
-19
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
@@ -87,6 +87,7 @@
8787
"gl-mesh3d": "^2.3.1",
8888
"gl-plot2d": "^1.4.5",
8989
"gl-plot3d": "^2.4.7",
90+
"gl-pointcloud2d": "^1.0.3",
9091
"gl-scatter3d": "^1.2.3",
9192
"gl-select-box": "^1.0.4",
9293
"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/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',

src/plots/cartesian/include_components.js

Lines changed: 2 additions & 2 deletions
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 hasCartesianOrHeatmapgl = layoutOut._has('cartesian') || layoutOut._has('gl2d');
38+
var hasCartesianOrGL2D = 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(!hasCartesianOrHeatmapgl) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
52+
if(!hasCartesianOrGL2D) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
5353

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

0 commit comments

Comments
 (0)