@@ -102,6 +102,8 @@ exports.valObjectMeta = {
102102 requiredOpts : [ ] ,
103103 otherOpts : [ 'dflt' , 'min' , 'max' , 'arrayOk' ] ,
104104 coerceFunction : function ( v , propOut , dflt , opts ) {
105+ if ( isTypedArraySpec ( v ) ) v = decodeTypedArraySpec ( v ) ;
106+
105107 if ( ! isNumeric ( v ) ||
106108 ( opts . min !== undefined && v < opts . min ) ||
107109 ( opts . max !== undefined && v > opts . max ) ) {
@@ -116,8 +118,15 @@ exports.valObjectMeta = {
116118 'are coerced to the `dflt`.'
117119 ] . join ( ' ' ) ,
118120 requiredOpts : [ ] ,
119- otherOpts : [ 'dflt' , 'min' , 'max' , 'arrayOk' ] ,
121+ otherOpts : [ 'dflt' , 'min' , 'max' , 'arrayOk' , 'extras' ] ,
120122 coerceFunction : function ( v , propOut , dflt , opts ) {
123+ if ( ( opts . extras || [ ] ) . indexOf ( v ) !== - 1 ) {
124+ propOut . set ( v ) ;
125+ return ;
126+ }
127+
128+ if ( isTypedArraySpec ( v ) ) v = decodeTypedArraySpec ( v ) ;
129+
121130 if ( v % 1 || ! isNumeric ( v ) ||
122131 ( opts . min !== undefined && v < opts . min ) ||
123132 ( opts . max !== undefined && v > opts . max ) ) {
@@ -158,6 +167,8 @@ exports.valObjectMeta = {
158167 requiredOpts : [ ] ,
159168 otherOpts : [ 'dflt' , 'arrayOk' ] ,
160169 coerceFunction : function ( v , propOut , dflt ) {
170+ if ( isTypedArraySpec ( v ) ) v = decodeTypedArraySpec ( v ) ;
171+
161172 if ( tinycolor ( v ) . isValid ( ) ) propOut . set ( v ) ;
162173 else propOut . set ( dflt ) ;
163174 }
@@ -200,6 +211,8 @@ exports.valObjectMeta = {
200211 requiredOpts : [ ] ,
201212 otherOpts : [ 'dflt' , 'arrayOk' ] ,
202213 coerceFunction : function ( v , propOut , dflt ) {
214+ if ( isTypedArraySpec ( v ) ) v = decodeTypedArraySpec ( v ) ;
215+
203216 if ( v === 'auto' ) propOut . set ( 'auto' ) ;
204217 else if ( ! isNumeric ( v ) ) propOut . set ( dflt ) ;
205218 else propOut . set ( modHalf ( + v , 360 ) ) ;
0 commit comments