@@ -34,7 +34,6 @@ exports.UNDERSCORE_ATTRS = UNDERSCORE_ATTRS;
3434 * - defs
3535 * - traces
3636 * - layout
37- * - transforms
3837 * - frames
3938 * - animations
4039 * - config
@@ -46,12 +45,6 @@ exports.get = function() {
4645 traces [ type ] = getTraceAttributes ( type ) ;
4746 } ) ;
4847
49- var transforms = { } ;
50-
51- Object . keys ( Registry . transformsRegistry ) . forEach ( function ( type ) {
52- transforms [ type ] = getTransformAttributes ( type ) ;
53- } ) ;
54-
5548 return {
5649 defs : {
5750 valObjects : valObjectMeta ,
@@ -83,8 +76,6 @@ exports.get = function() {
8376 traces : traces ,
8477 layout : getLayoutAttributes ( ) ,
8578
86- transforms : transforms ,
87-
8879 frames : getFramesAttributes ( ) ,
8980 animation : formatAttributes ( animationAttributes ) ,
9081
@@ -218,21 +209,6 @@ exports.findArrayAttributes = function(trace) {
218209 exports . crawl ( trace . _module . attributes , callback ) ;
219210 }
220211
221- var transforms = trace . transforms ;
222- if ( transforms ) {
223- for ( var i = 0 ; i < transforms . length ; i ++ ) {
224- var transform = transforms [ i ] ;
225- var module = transform . _module ;
226-
227- if ( module ) {
228- baseAttrName = 'transforms[' + i + '].' ;
229- baseContainer = transform ;
230-
231- exports . crawl ( module . attributes , callback ) ;
232- }
233- }
234- }
235-
236212 return arrayAttributes ;
237213} ;
238214
@@ -256,41 +232,26 @@ exports.getTraceValObject = function(trace, parts) {
256232 var i = 1 ; // index to start recursing from
257233 var moduleAttrs , valObject ;
258234
259- if ( head === 'transforms' ) {
260- if ( parts . length === 1 ) {
261- return baseAttributes . transforms ;
262- }
263- var transforms = trace . transforms ;
264- if ( ! Array . isArray ( transforms ) || ! transforms . length ) return false ;
265- var tNum = parts [ 1 ] ;
266- if ( ! isIndex ( tNum ) || tNum >= transforms . length ) {
267- return false ;
268- }
269- moduleAttrs = ( Registry . transformsRegistry [ transforms [ tNum ] . type ] || { } ) . attributes ;
270- valObject = moduleAttrs && moduleAttrs [ parts [ 2 ] ] ;
271- i = 3 ; // start recursing only inside the transform
272- } else {
273- // first look in the module for this trace
274- // components have already merged their trace attributes in here
275- var _module = trace . _module ;
276- if ( ! _module ) _module = ( Registry . modules [ trace . type || baseAttributes . type . dflt ] || { } ) . _module ;
277- if ( ! _module ) return false ;
278-
279- moduleAttrs = _module . attributes ;
280- valObject = moduleAttrs && moduleAttrs [ head ] ;
281-
282- // then look in the subplot attributes
283- if ( ! valObject ) {
284- var subplotModule = _module . basePlotModule ;
285- if ( subplotModule && subplotModule . attributes ) {
286- valObject = subplotModule . attributes [ head ] ;
287- }
288- }
235+ // first look in the module for this trace
236+ // components have already merged their trace attributes in here
237+ var _module = trace . _module ;
238+ if ( ! _module ) _module = ( Registry . modules [ trace . type || baseAttributes . type . dflt ] || { } ) . _module ;
239+ if ( ! _module ) return false ;
240+
241+ moduleAttrs = _module . attributes ;
242+ valObject = moduleAttrs && moduleAttrs [ head ] ;
289243
290- // finally look in the global attributes
291- if ( ! valObject ) valObject = baseAttributes [ head ] ;
244+ // then look in the subplot attributes
245+ if ( ! valObject ) {
246+ var subplotModule = _module . basePlotModule ;
247+ if ( subplotModule && subplotModule . attributes ) {
248+ valObject = subplotModule . attributes [ head ] ;
249+ }
292250 }
293251
252+ // finally look in the global attributes
253+ if ( ! valObject ) valObject = baseAttributes [ head ] ;
254+
294255 return recurseIntoValObject ( valObject , parts , i ) ;
295256} ;
296257
@@ -567,26 +528,6 @@ function getLayoutAttributes() {
567528 } ;
568529}
569530
570- function getTransformAttributes ( type ) {
571- var _module = Registry . transformsRegistry [ type ] ;
572- var attributes = extendDeepAll ( { } , _module . attributes ) ;
573-
574- // add registered components transform attributes
575- Object . keys ( Registry . componentsRegistry ) . forEach ( function ( k ) {
576- var _module = Registry . componentsRegistry [ k ] ;
577-
578- if ( _module . schema && _module . schema . transforms && _module . schema . transforms [ type ] ) {
579- Object . keys ( _module . schema . transforms [ type ] ) . forEach ( function ( v ) {
580- insertAttrs ( attributes , _module . schema . transforms [ type ] [ v ] , v ) ;
581- } ) ;
582- }
583- } ) ;
584-
585- return {
586- attributes : formatAttributes ( attributes )
587- } ;
588- }
589-
590531function getFramesAttributes ( ) {
591532 var attrs = {
592533 frames : extendDeepAll ( { } , frameAttributes )
0 commit comments