Skip to content

Commit f8e7ee4

Browse files
authoredFeb 28, 2018
Merge pull request #2388 from plotly/typed-arrays-support
Typed arrays support
2 parents 22cfd39 + d4cb0c4 commit f8e7ee4

File tree

102 files changed

+1127
-476
lines changed

Some content is hidden

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

102 files changed

+1127
-476
lines changed
 

Diff for: ‎.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"Int16Array": true,
1818
"Int32Array": true,
1919
"ArrayBuffer": true,
20+
"DataView": true,
2021
"SVGElement": false
2122
},
2223
"rules": {

Diff for: ‎src/components/colorscale/has_colorscale.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,20 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9-
109
'use strict';
1110

1211
var isNumeric = require('fast-isnumeric');
13-
1412
var Lib = require('../../lib');
15-
1613
var isValidScale = require('./is_valid_scale');
1714

18-
1915
module.exports = function hasColorscale(trace, containerStr) {
2016
var container = containerStr ?
21-
Lib.nestedProperty(trace, containerStr).get() || {} :
22-
trace,
23-
color = container.color,
24-
isArrayWithOneNumber = false;
17+
Lib.nestedProperty(trace, containerStr).get() || {} :
18+
trace;
19+
var color = container.color;
2520

26-
if(Array.isArray(color)) {
21+
var isArrayWithOneNumber = false;
22+
if(Lib.isArrayOrTypedArray(color)) {
2723
for(var i = 0; i < color.length; i++) {
2824
if(isNumeric(color[i])) {
2925
isArrayWithOneNumber = true;

0 commit comments

Comments
 (0)
Please sign in to comment.