Skip to content

Commit 066f45d

Browse files
committed
eliminating last remnants of Float32Array in scattergl/convert
1 parent 9541764 commit 066f45d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"es6-promise": "^3.0.2",
6060
"fast-isnumeric": "^1.1.1",
6161
"gl-contour2d": "^1.1.2",
62-
"gl-error2d": "monfera/gl-line2d#64-bit",
62+
"gl-error2d": "monfera/gl-error2d#64-bit",
6363
"gl-error3d": "^1.0.0",
6464
"gl-heatmap2d": "^1.0.2",
6565
"gl-line2d": "monfera/gl-line2d#64-bit",
@@ -70,7 +70,7 @@
7070
"gl-plot3d": "^1.5.1",
7171
"gl-pointcloud2d": "^1.0.0",
7272
"gl-scatter2d": "monfera/gl-scatter2d#64-bit",
73-
"gl-scatter2d-fancy": "monfera/gl-scatter2d#64-bit",
73+
"gl-scatter2d-fancy": "monfera/gl-scatter2d-fancy#64-bit",
7474
"gl-scatter3d": "^1.0.4",
7575
"gl-select-box": "^1.0.1",
7676
"gl-shader": "4.2.0",

src/traces/scattergl/convert.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ function LineWithMarkers(scene, uid) {
6767

6868
this.hasErrorX = false;
6969
this.errorXOptions = {
70-
positions: new Float32Array(0),
71-
errors: new Float32Array(0),
70+
positions: new Float64Array(0),
71+
errors: new Float64Array(0),
7272
lineWidth: 1,
7373
capSize: 0,
7474
color: [0, 0, 0, 1]
@@ -78,8 +78,8 @@ function LineWithMarkers(scene, uid) {
7878

7979
this.hasErrorY = false;
8080
this.errorYOptions = {
81-
positions: new Float32Array(0),
82-
errors: new Float32Array(0),
81+
positions: new Float64Array(0),
82+
errors: new Float64Array(0),
8383
lineWidth: 1,
8484
capSize: 0,
8585
color: [0, 0, 0, 1]
@@ -89,7 +89,7 @@ function LineWithMarkers(scene, uid) {
8989

9090
this.hasMarkers = false;
9191
this.scatterOptions = {
92-
positions: new Float32Array(0),
92+
positions: new Float64Array(0),
9393
sizes: [],
9494
colors: [],
9595
glyphs: [],
@@ -390,8 +390,8 @@ proto.updateFancy = function(options) {
390390
var len = x.length,
391391
idToIndex = new Array(len),
392392
positions = new Float64Array(2 * len),
393-
errorsX = new Float32Array(4 * len),
394-
errorsY = new Float32Array(4 * len),
393+
errorsX = new Float64Array(4 * len),
394+
errorsY = new Float64Array(4 * len),
395395
pId = 0,
396396
ptr = 0,
397397
ptrX = 0,
@@ -482,13 +482,13 @@ proto.updateFancy = function(options) {
482482
this.fancyScatter.update(this.scatterOptions);
483483
}
484484
else {
485-
this.scatterOptions.positions = new Float32Array(0);
485+
this.scatterOptions.positions = new Float64Array(0);
486486
this.scatterOptions.glyphs = [];
487487
this.fancyScatter.update(this.scatterOptions);
488488
}
489489

490490
// turn off fast scatter plot
491-
this.scatterOptions.positions = new Float32Array(0);
491+
this.scatterOptions.positions = new Float64Array(0);
492492
this.scatterOptions.glyphs = [];
493493
this.scatter.update(this.scatterOptions);
494494

@@ -565,7 +565,7 @@ proto.updateError = function(axLetter, options, positions, errors) {
565565
errorObjOptions.color = convertColor(errorOptions.color, 1, 1);
566566
}
567567
else {
568-
errorObjOptions.positions = new Float32Array(0);
568+
errorObjOptions.positions = new Float64Array(0);
569569
}
570570

571571
errorObj.update(errorObjOptions);
@@ -588,7 +588,7 @@ proto.expandAxesFast = function(bounds, markerSize) {
588588
}
589589
};
590590

591-
// not quite on-par with 'scatter' (scatter fill in several other expand options),
591+
// not quite on-par with 'scatter' (scatter fill in several other expand options)
592592
// but close enough for now
593593
proto.expandAxesFancy = function(x, y, ppad) {
594594
var scene = this.scene,

0 commit comments

Comments
 (0)