Skip to content

Commit a344464

Browse files
committed
decorline > lineposition
1 parent 3ff255f commit a344464

File tree

66 files changed

+4027
-4027
lines changed

Some content is hidden

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

66 files changed

+4027
-4027
lines changed

src/components/annotations/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function drawRaw(gd, options, index, subplotId, xa, ya) {
200200
fontStyle: hoverFont.style,
201201
fontVariant: hoverFont.variant,
202202
fontShadow: hoverFont.fontShadow,
203-
fontDecorline: hoverFont.fontDecorline,
203+
fontLineposition: hoverFont.fontLineposition,
204204
fontTextcase: hoverFont.fontTextcase,
205205
}, {
206206
container: fullLayout._hoverlayer.node(),

src/components/drawing/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ drawing.font = function(s, font) {
3535
var size = font.size;
3636
var family = font.family;
3737
var shadow = font.shadow;
38-
var decorline = font.decorline;
38+
var lineposition = font.lineposition;
3939
var textcase = font.textcase;
4040

4141
if(family) s.style('font-family', family);
@@ -48,7 +48,7 @@ drawing.font = function(s, font) {
4848

4949
if(textcase) s.style('text-transform', textcase2transform(textcase));
5050
if(shadow) s.style('text-shadow', shadow === 'auto' ? svgTextUtils.makeTextShadow(Color.contrast(color)) : shadow);
51-
if(decorline) s.style('text-decoration-line', decorline2decorationLine(decorline));
51+
if(lineposition) s.style('text-decoration-line', lineposition2decorationLine(lineposition));
5252
};
5353

5454
var textcase2transformOptions = {
@@ -62,9 +62,9 @@ function textcase2transform(textcase) {
6262
return textcase2transformOptions[textcase];
6363
}
6464

65-
function decorline2decorationLine(decorline) {
65+
function lineposition2decorationLine(lineposition) {
6666
return (
67-
decorline
67+
lineposition
6868
.replace('under', 'underline')
6969
.replace('over', 'overline')
7070
.replace('through', 'line-through')
@@ -1166,7 +1166,7 @@ drawing.textPointStyle = function(s, trace, gd) {
11661166
style: d.ty || trace.textfont.style,
11671167
variant: d.tv || trace.textfont.variant,
11681168
textcase: d.tC || trace.textfont.textcase,
1169-
decorline: d.tE || trace.textfont.decorline,
1169+
lineposition: d.tE || trace.textfont.lineposition,
11701170
shadow: d.tS || trace.textfont.shadow,
11711171
size: fontSize,
11721172
color: fontColor

src/components/fx/hover.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ function createHoverText(hoverData, opts) {
962962
var fontStyle = opts.fontStyle || fullLayout.font.style;
963963
var fontVariant = opts.fontVariant || fullLayout.font.variant;
964964
var fontTextcase = opts.fontTextcase || fullLayout.font.textcase;
965-
var fontDecorline = opts.fontDecorline || fullLayout.font.decorline;
965+
var fontLineposition = opts.fontLineposition || fullLayout.font.lineposition;
966966
var fontShadow = opts.fontShadow || fullLayout.font.shadow;
967967

968968
var c0 = hoverData[0];
@@ -1050,7 +1050,7 @@ function createHoverText(hoverData, opts) {
10501050
style: commonLabelOptsFont.style || fontStyle,
10511051
variant: commonLabelOptsFont.variant || fontVariant,
10521052
textcase: commonLabelOptsFont.textcase || fontTextcase,
1053-
decorline: commonLabelOptsFont.decorline || fontDecorline,
1053+
lineposition: commonLabelOptsFont.lineposition || fontLineposition,
10541054
shadow: commonLabelOptsFont.shadow || fontShadow,
10551055
family: commonLabelOptsFont.family || fontFamily,
10561056
size: commonLabelOptsFont.size || fontSize,
@@ -1378,7 +1378,7 @@ function createHoverText(hoverData, opts) {
13781378
style: fontStyle,
13791379
variant: fontVariant,
13801380
textcase: fontTextcase,
1381-
decorline: fontDecorline,
1381+
lineposition: fontLineposition,
13821382
shadow: fontShadow,
13831383
family: fontFamily,
13841384
size: fontSize
@@ -1425,7 +1425,7 @@ function createHoverText(hoverData, opts) {
14251425
style: d.fontStyle || fontStyle,
14261426
variant: d.fontVariant || fontVariant,
14271427
textcase: d.fontTextcase || fontTextcase,
1428-
decorline: d.fontDecorline || fontDecorline,
1428+
lineposition: d.fontLineposition || fontLineposition,
14291429
shadow: d.fontShadow || fontShadow,
14301430
})
14311431
.text(text)
@@ -1447,7 +1447,7 @@ function createHoverText(hoverData, opts) {
14471447
style: d.fontStyle || fontStyle,
14481448
variant: d.fontVariant || fontVariant,
14491449
textcase: d.fontTextcase || fontTextcase,
1450-
decorline: d.fontDecorline || fontDecorline,
1450+
lineposition: d.fontLineposition || fontLineposition,
14511451
shadow: d.fontShadow || fontShadow,
14521452
}).text(name)
14531453
.attr('data-notex', 1)

src/components/legend/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ module.exports = function style(s, gd, legend) {
248248
dEdit.ty = boundVal('textfont.style', pickFirst);
249249
dEdit.tv = boundVal('textfont.variant', pickFirst);
250250
dEdit.tC = boundVal('textfont.textcase', pickFirst);
251-
dEdit.tE = boundVal('textfont.decorline', pickFirst);
251+
dEdit.tE = boundVal('textfont.lineposition', pickFirst);
252252
dEdit.tS = boundVal('textfont.shadow', pickFirst);
253253
}
254254

src/components/titles/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function draw(gd, titleClass, options) {
7272
var fontStyle = font.style;
7373
var fontVariant = font.variant;
7474
var fontTextcase = font.textcase;
75-
var fontDecorline = font.decorline;
75+
var fontLineposition = font.lineposition;
7676
var fontShadow = font.shadow;
7777

7878
// only make this title editable if we positively identify its property
@@ -157,7 +157,7 @@ function draw(gd, titleClass, options) {
157157
variant: fontVariant,
158158
textcase: fontTextcase,
159159
shadow: fontShadow,
160-
decorline: fontDecorline,
160+
lineposition: fontLineposition,
161161
})
162162
.attr(attributes)
163163
.call(svgTextUtils.convertToTspans, gd);

src/lib/coerce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ exports.coerceFont = function(coerce, attr, dfltObj, opts) {
484484
};
485485

486486
if(!opts.noFontVariant) out.variant = coerce(attr + '.variant', dfltObj.variant);
487-
if(!opts.noFontDecorline) out.decorline = coerce(attr + '.decorline', dfltObj.decorline);
487+
if(!opts.noFontLineposition) out.lineposition = coerce(attr + '.lineposition', dfltObj.lineposition);
488488
if(!opts.noFontTextcase) out.textcase = coerce(attr + '.textcase', dfltObj.textcase);
489489
if(!opts.noFontShadow) {
490490
var dfltShadow = dfltObj.shadow;

src/plots/cartesian/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,7 @@ function tickTextObj(ax, x, text) {
17411741
fontStyle: tf.style,
17421742
fontVariant: tf.variant,
17431743
fontTextcase: tf.textcase,
1744-
fontDecorline: tf.decorline,
1744+
fontLineposition: tf.lineposition,
17451745
fontShadow: tf.shadow,
17461746
fontColor: tf.color
17471747
};
@@ -3512,7 +3512,7 @@ axes.drawLabels = function(gd, ax, opts) {
35123512
style: d.fontStyle,
35133513
variant: d.fontVariant,
35143514
textcase: d.fontTextcase,
3515-
decorline: d.fontDecorline,
3515+
lineposition: d.fontLineposition,
35163516
shadow: d.fontShadow,
35173517
})
35183518
.text(d.text)

src/plots/font_attributes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ module.exports = function(opts) {
111111
].join(' ')
112112
},
113113

114-
decorline: opts.noFontDecorline ? undefined : {
114+
lineposition: opts.noFontLineposition ? undefined : {
115115
editType: editType,
116116
valType: 'flaglist',
117117
flags: ['under', 'over', 'through'],
@@ -154,8 +154,8 @@ module.exports = function(opts) {
154154
if(!opts.noFontTextcase) {
155155
attrs.textcase.arrayOk = true;
156156
}
157-
if(!opts.noFontDecorline) {
158-
attrs.decorline.arrayOk = true;
157+
if(!opts.noFontLineposition) {
158+
attrs.lineposition.arrayOk = true;
159159
}
160160
if(!opts.noFontShadow) {
161161
attrs.shadow.arrayOk = true;

src/plots/mapbox/layout_attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var constants = require('./constants');
1313
var fontAttr = fontAttrs({
1414
noFontVariant: true,
1515
noFontShadow: true,
16-
noFontDecorline: true,
16+
noFontLineposition: true,
1717
noFontTextcase: true,
1818
description: [
1919
'Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).',

src/plots/mapbox/layout_defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function handleLayerDefaults(layerIn, layerOut) {
106106
Lib.coerceFont(coerce, 'symbol.textfont', undefined, {
107107
noFontVariant: true,
108108
noFontShadow: true,
109-
noFontDecorline: true,
109+
noFontLineposition: true,
110110
noFontTextcase: true,
111111
});
112112
coerce('symbol.textposition');

0 commit comments

Comments
 (0)