Skip to content

Commit 3aefeff

Browse files
committed
Minor formatting updates
1 parent 4d1516e commit 3aefeff

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎src/traces/quiver/plot.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var d3 = require('@plotly/d3');
44

55
var Lib = require('../../lib');
66
var Drawing = require('../../components/drawing');
7-
var strokeArrowColors = require('./style').strokeArrowColors;
7+
const { strokeArrowColors } = require('./style');
88

99
// Fixed arrowhead wedge angle (radians). Arrow direction is fully
1010
// determined by u,v (see angPx below); this constant only controls the

‎src/traces/quiver/style.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var Lib = require('../../lib');
55

66
var Drawing = require('../../components/drawing');
77
var Colorscale = require('../../components/colorscale');
8-
var Color = require('../../components/color');
8+
const Color = require('../../components/color');
99
var DESELECTDIM = require('../../constants/interactions').DESELECTDIM;
1010

1111
// Stroke each arrow path according to the trace colorscale, using marker.color
@@ -37,18 +37,18 @@ function colorscaleStroke(paths, trace) {
3737
// A color-string array is not a colorscale. Apply each string here, because
3838
// `lineGroupStyle` paints an array as black.
3939
const strokeArrowColors = (paths, trace) => {
40-
if(trace._hasColorscale) {
40+
if (trace._hasColorscale) {
4141
colorscaleStroke(paths, trace);
4242
return;
4343
}
4444

4545
const markerColor = (trace.marker || {}).color;
46-
if(!Lib.isArrayOrTypedArray(markerColor)) return;
46+
if (!Lib.isArrayOrTypedArray(markerColor)) return;
4747

48-
paths.style('stroke', function(cdi) {
49-
if(markerColor.length > cdi.i) {
48+
paths.style('stroke', function (cdi) {
49+
if (markerColor.length > cdi.i) {
5050
const color = markerColor[cdi.i];
51-
if(Color.isValid(color)) {
51+
if (Color.isValid(color)) {
5252
cdi.mcc = color;
5353
return color;
5454
}
@@ -117,8 +117,8 @@ function styleArrows(gd, cd, sel) {
117117
}
118118

119119
module.exports = {
120-
style: style,
121-
styleOnSelect: styleOnSelect,
122-
colorscaleStroke: colorscaleStroke,
123-
strokeArrowColors: strokeArrowColors
120+
style,
121+
styleOnSelect,
122+
colorscaleStroke,
123+
strokeArrowColors
124124
};

0 commit comments

Comments
 (0)