Skip to content

Commit

Permalink
no integer weight
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Apr 22, 2024
1 parent b8877ff commit f4d4f4c
Show file tree
Hide file tree
Showing 3 changed files with 970 additions and 1,622 deletions.
7 changes: 1 addition & 6 deletions src/lib/coerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,8 @@ exports.valObjectMeta = {
'are coerced to the `dflt`.'
].join(' '),
requiredOpts: [],
otherOpts: ['dflt', 'min', 'max', 'arrayOk', 'extras'],
otherOpts: ['dflt', 'min', 'max', 'arrayOk'],
coerceFunction: function(v, propOut, dflt, opts) {
if((opts.extras || []).indexOf(v) !== -1) {
propOut.set(v);
return;
}

if(v % 1 || !isNumeric(v) ||
(opts.min !== undefined && v < opts.min) ||
(opts.max !== undefined && v > opts.max)) {
Expand Down
6 changes: 2 additions & 4 deletions src/plots/font_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ module.exports = function(opts) {

weight: {
editType: editType,
valType: 'integer',
min: 1,
max: 1000,
extras: ['normal', 'bold'],
valType: 'enumerated',
values: ['normal', 'bold'],
dflt: 'normal',
description: [
'Sets the weight (or boldness) of the font.'
Expand Down
Loading

0 comments on commit f4d4f4c

Please sign in to comment.