Skip to content

Commit f77f90b

Browse files
committedJan 13, 2018
Fix gl2d_click test
1 parent 4d001a2 commit f77f90b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
 

‎src/lib/str2rgbarray.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
'use strict';
1111

12-
var rgba = require('color-rgba');
12+
var rgba = require('color-normalize');
1313

1414
function str2RgbaArray(color) {
15-
var colorOut = rgba(color);
16-
return colorOut.length ? colorOut : [0, 0, 0, 1];
15+
if(!color) return [0, 0, 0, 1];
16+
return rgba(color);
1717
}
1818

1919
module.exports = str2RgbaArray;

‎test/jasmine/tests/gl2d_click_test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ describe('Test hover and click interactions', function() {
358358
y: 18,
359359
curveNumber: 2,
360360
pointNumber: 0,
361-
bgcolor: 'rgb(44, 160, 44)',
362-
bordercolor: 'rgb(255, 255, 255)',
361+
bgcolor: 'rgb(255, 127, 14)',
362+
bordercolor: 'rgb(68, 68, 68)',
363363
fontSize: 13,
364364
fontFamily: 'Arial',
365-
fontColor: 'rgb(255, 255, 255)'
365+
fontColor: 'rgb(68, 68, 68)'
366366
}, {
367367
msg: 'scattergl after visibility restyle'
368368
});
@@ -406,11 +406,11 @@ describe('Test hover and click interactions', function() {
406406
y: 18,
407407
curveNumber: 2,
408408
pointNumber: 0,
409-
bgcolor: 'rgb(44, 160, 44)',
410-
bordercolor: 'rgb(255, 255, 255)',
409+
bgcolor: 'rgb(255, 127, 14)',
410+
bordercolor: 'rgb(68, 68, 68)',
411411
fontSize: 13,
412412
fontFamily: 'Arial',
413-
fontColor: 'rgb(255, 255, 255)'
413+
fontColor: 'rgb(68, 68, 68)'
414414
}, {
415415
msg: 'scattergl fancy after visibility restyle'
416416
});

0 commit comments

Comments
 (0)