Skip to content

Commit f4d4f4c

Browse files
committed
no integer weight
1 parent b8877ff commit f4d4f4c

File tree

3 files changed

+970
-1622
lines changed

3 files changed

+970
-1622
lines changed

src/lib/coerce.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,8 @@ exports.valObjectMeta = {
114114
'are coerced to the `dflt`.'
115115
].join(' '),
116116
requiredOpts: [],
117-
otherOpts: ['dflt', 'min', 'max', 'arrayOk', 'extras'],
117+
otherOpts: ['dflt', 'min', 'max', 'arrayOk'],
118118
coerceFunction: function(v, propOut, dflt, opts) {
119-
if((opts.extras || []).indexOf(v) !== -1) {
120-
propOut.set(v);
121-
return;
122-
}
123-
124119
if(v % 1 || !isNumeric(v) ||
125120
(opts.min !== undefined && v < opts.min) ||
126121
(opts.max !== undefined && v > opts.max)) {

src/plots/font_attributes.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ module.exports = function(opts) {
5151

5252
weight: {
5353
editType: editType,
54-
valType: 'integer',
55-
min: 1,
56-
max: 1000,
57-
extras: ['normal', 'bold'],
54+
valType: 'enumerated',
55+
values: ['normal', 'bold'],
5856
dflt: 'normal',
5957
description: [
6058
'Sets the weight (or boldness) of the font.'

0 commit comments

Comments
 (0)