Skip to content

Commit dcbad32

Browse files
committed
rm extended spacing pattern
1 parent 68f94cb commit dcbad32

File tree

1 file changed

+49
-48
lines changed

1 file changed

+49
-48
lines changed

src/plots/gl3d/layout/convert.js

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,53 @@ var arrayCopy1D = arrtools.copy1D;
1818
var AXES_NAMES = ['xaxis', 'yaxis', 'zaxis'];
1919

2020
function AxesOptions() {
21-
this.bounds = [ [-10, -10, -10],
22-
[ 10, 10, 10] ];
23-
24-
this.ticks = [ [], [], [] ];
25-
this.tickEnable = [ true, true, true ];
26-
this.tickFont = [ 'sans-serif', 'sans-serif', 'sans-serif' ];
27-
this.tickSize = [ 12, 12, 12 ];
28-
this.tickAngle = [ 0, 0, 0 ];
29-
this.tickColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
30-
this.tickPad = [ 18, 18, 18 ];
31-
32-
this.labels = [ 'x', 'y', 'z' ];
33-
this.labelEnable = [ true, true, true ];
34-
this.labelFont = ['Open Sans','Open Sans','Open Sans'];
35-
this.labelSize = [ 20, 20, 20 ];
36-
this.labelAngle = [ 0, 0, 0 ];
37-
this.labelColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
38-
this.labelPad = [ 30, 30, 30 ];
39-
40-
this.lineEnable = [ true, true, true ];
41-
this.lineMirror = [ false, false, false ];
42-
this.lineWidth = [ 1, 1, 1 ];
43-
this.lineColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
21+
this.bounds = [ [-10, -10, -10],
22+
[ 10, 10, 10] ];
23+
24+
this.ticks = [ [], [], [] ];
25+
this.tickEnable = [ true, true, true ];
26+
this.tickFont = [ 'sans-serif', 'sans-serif', 'sans-serif' ];
27+
this.tickSize = [ 12, 12, 12 ];
28+
this.tickAngle = [ 0, 0, 0 ];
29+
this.tickColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
30+
this.tickPad = [ 18, 18, 18 ];
31+
32+
this.labels = [ 'x', 'y', 'z' ];
33+
this.labelEnable = [ true, true, true ];
34+
this.labelFont = ['Open Sans','Open Sans','Open Sans'];
35+
this.labelSize = [ 20, 20, 20 ];
36+
this.labelAngle = [ 0, 0, 0 ];
37+
this.labelColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
38+
this.labelPad = [ 30, 30, 30 ];
39+
40+
this.lineEnable = [ true, true, true ];
41+
this.lineMirror = [ false, false, false ];
42+
this.lineWidth = [ 1, 1, 1 ];
43+
this.lineColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
4444

4545
this.lineTickEnable = [ true, true, true ];
4646
this.lineTickMirror = [ false, false, false ];
4747
this.lineTickLength = [ 10, 10, 10 ];
48-
this.lineTickWidth = [ 1, 1, 1 ];
49-
this.lineTickColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
48+
this.lineTickWidth = [ 1, 1, 1 ];
49+
this.lineTickColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
5050

51-
this.gridEnable = [ true, true, true ];
52-
this.gridWidth = [ 1, 1, 1 ];
53-
this.gridColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
51+
this.gridEnable = [ true, true, true ];
52+
this.gridWidth = [ 1, 1, 1 ];
53+
this.gridColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
5454

55-
this.zeroEnable = [ true, true, true ];
56-
this.zeroLineColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
57-
this.zeroLineWidth = [ 2, 2, 2 ];
55+
this.zeroEnable = [ true, true, true ];
56+
this.zeroLineColor = [ [0,0,0,1], [0,0,0,1], [0,0,0,1] ];
57+
this.zeroLineWidth = [ 2, 2, 2 ];
5858

5959
this.backgroundEnable = [ true, true, true ];
6060
this.backgroundColor = [ [0.8, 0.8, 0.8, 0.5],
6161
[0.8, 0.8, 0.8, 0.5],
6262
[0.8, 0.8, 0.8, 0.5] ];
6363

6464
// some default values are stored for applying model transforms
65-
this._defaultTickPad = arrayCopy1D(this.tickPad);
66-
this._defaultLabelPad = arrayCopy1D(this.labelPad);
67-
this._defaultLineTickLength = arrayCopy1D(this.lineTickLength);
65+
this._defaultTickPad = arrayCopy1D(this.tickPad);
66+
this._defaultLabelPad = arrayCopy1D(this.labelPad);
67+
this._defaultLineTickLength = arrayCopy1D(this.lineTickLength);
6868
}
6969

7070
var proto = AxesOptions.prototype;
@@ -78,22 +78,23 @@ proto.merge = function(sceneLayout) {
7878
opts.labels[i] = convertHTML(axes.title);
7979
if ('titlefont' in axes) {
8080
if (axes.titlefont.color) opts.labelColor[i] = str2RgbaArray(axes.titlefont.color);
81-
if (axes.titlefont.family) opts.labelFont[i] = axes.titlefont.family;
82-
if (axes.titlefont.size) opts.labelSize[i] = axes.titlefont.size;
81+
if (axes.titlefont.family) opts.labelFont[i] = axes.titlefont.family;
82+
if (axes.titlefont.size) opts.labelSize[i] = axes.titlefont.size;
8383
}
8484

8585
/////// LINES ////////
8686
if ('showline' in axes) opts.lineEnable[i] = axes.showline;
87-
if ('linecolor' in axes) opts.lineColor[i] = str2RgbaArray(axes.linecolor);
88-
if ('linewidth' in axes) opts.lineWidth[i] = axes.linewidth;
87+
if ('linecolor' in axes) opts.lineColor[i] = str2RgbaArray(axes.linecolor);
88+
if ('linewidth' in axes) opts.lineWidth[i] = axes.linewidth;
8989

9090
if ('showgrid' in axes) opts.gridEnable[i] = axes.showgrid;
91-
if ('gridcolor' in axes) opts.gridColor[i] = str2RgbaArray(axes.gridcolor);
92-
if ('gridwidth' in axes) opts.gridWidth[i] = axes.gridwidth;
91+
if ('gridcolor' in axes) opts.gridColor[i] = str2RgbaArray(axes.gridcolor);
92+
if ('gridwidth' in axes) opts.gridWidth[i] = axes.gridwidth;
9393

94-
// Remove zeroline if axis type is log //
95-
if (axes.type === 'log') opts.zeroEnable[i] = false;
96-
else if ('zeroline' in axes) opts.zeroEnable[i] = axes.zeroline;
94+
// Remove zeroline if axis type is log
95+
// otherwise the zeroline is incorrectly drawn at 1 on log axes
96+
if (axes.type === 'log') opts.zeroEnable[i] = false;
97+
else if ('zeroline' in axes) opts.zeroEnable[i] = axes.zeroline;
9798
if ('zerolinecolor' in axes) opts.zeroLineColor[i] = str2RgbaArray(axes.zerolinecolor);
9899
if ('zerolinewidth' in axes) opts.zeroLineWidth[i] = axes.zerolinewidth;
99100

@@ -113,9 +114,9 @@ proto.merge = function(sceneLayout) {
113114
//// tick labels
114115
if ('showticklabels' in axes) opts.tickEnable[i] = axes.showticklabels;
115116
if ('tickfont' in axes) {
116-
if (axes.tickfont.color) opts.tickColor[i] = str2RgbaArray(axes.tickfont.color);
117-
if (axes.tickfont.family) opts.tickFont[i] = axes.tickfont.family;
118-
if (axes.tickfont.size) opts.tickSize[i] = axes.tickfont.size;
117+
if (axes.tickfont.color) opts.tickColor[i] = str2RgbaArray(axes.tickfont.color);
118+
if (axes.tickfont.family) opts.tickFont[i] = axes.tickfont.family;
119+
if (axes.tickfont.size) opts.tickSize[i] = axes.tickfont.size;
119120
}
120121

121122
if ('mirror' in axes) {
@@ -133,8 +134,8 @@ proto.merge = function(sceneLayout) {
133134

134135
////// grid background
135136
if ('showbackground' in axes && axes.showbackground !== false) {
136-
opts.backgroundEnable[i] = true;
137-
opts.backgroundColor[i] = str2RgbaArray(axes.backgroundcolor);
137+
opts.backgroundEnable[i] = true;
138+
opts.backgroundColor[i] = str2RgbaArray(axes.backgroundcolor);
138139
} else opts.backgroundEnable[i] = false;
139140
}
140141
};

0 commit comments

Comments
 (0)