Skip to content

Commit 73ab98d

Browse files
committed
Clean up
1 parent a74b301 commit 73ab98d

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

src/traces/scattergl/calc.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@
99

1010
'use strict';
1111

12-
var isNumeric = require('fast-isnumeric');
13-
1412
var Axes = require('../../plots/cartesian/axes');
1513

16-
var calcColorscale = require('../scatter/colorscale_calc');
17-
var arraysToCalcdata = require('../scatter/arrays_to_calcdata');
18-
19-
2014
module.exports = function calc(gd, trace) {
2115
var xa = Axes.getFromId(gd, trace.xaxis || 'x'),
2216
ya = Axes.getFromId(gd, trace.yaxis || 'y');

src/traces/scattergl/convert.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ function LineWithMarkers(scene, uid) {
101101
};
102102
var scatterOptions1 = Lib.extendFlat({}, scatterOptions0, {snapPoints: false});
103103

104-
this.scatter = this.initObject(function (plot, options) {
105-
return createScatter(plot, options)
106-
}, scatterOptions0, 3);
104+
this.scatter = this.initObject(createScatter, scatterOptions0, 3);
107105
this.fancyScatter = this.initObject(createFancyScatter, scatterOptions0, 4);
108106
this.selectScatter = this.initObject(createScatter, scatterOptions1, 5);
109107
}
@@ -120,9 +118,9 @@ proto.initObject = function(createFn, options, objIndex) {
120118
update: update,
121119
clear: clear,
122120
dispose: dispose
123-
}
121+
};
124122

125-
return result
123+
return result;
126124

127125
function update() {
128126
if(!obj) {

src/traces/scattergl/select.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module.exports = function selectPoints(searchInfo, polygon) {
1717
ya = searchInfo.yaxis,
1818
selection = [],
1919
trace = cd[0].trace,
20-
curveNumber = trace.index,
2120
i,
2221
di,
2322
x,
@@ -31,25 +30,21 @@ module.exports = function selectPoints(searchInfo, polygon) {
3130
if(trace.visible !== true || hasOnlyLines) return;
3231

3332
// filter out points by visible scatter ones
34-
// var scatter2d = scattergl.scatter.instance
35-
36-
if(polygon === false) { // clear selection
33+
if(polygon === false) {
34+
// clear selection
3735
for(i = 0; i < cd.length; i++) cd[i].dim = 0;
3836
}
3937
else {
4038
for(i = 0; i < cd.length; i++) {
4139
di = cd[i];
42-
//FIXME: this affects performance for 1e6 points
40+
// FIXME: this affects performance for 1e6 points
4341
x = xa.c2p(di.x);
4442
y = ya.c2p(di.y);
4543
if(polygon.contains([x, y])) {
4644
selection.push({
47-
// curveNumber: curveNumber,
4845
// pointNumber: i,
4946
x: di.x,
50-
y: di.y,
51-
// FIXME: di.id is undefined for scattergls
52-
// id: di.id
47+
y: di.y
5348
});
5449
di.dim = 0;
5550
}

0 commit comments

Comments
 (0)