@@ -34,7 +34,6 @@ exports.UNDERSCORE_ATTRS = UNDERSCORE_ATTRS;
34
34
* - defs
35
35
* - traces
36
36
* - layout
37
- * - transforms
38
37
* - frames
39
38
* - animations
40
39
* - config
@@ -46,12 +45,6 @@ exports.get = function() {
46
45
traces [ type ] = getTraceAttributes ( type ) ;
47
46
} ) ;
48
47
49
- var transforms = { } ;
50
-
51
- Object . keys ( Registry . transformsRegistry ) . forEach ( function ( type ) {
52
- transforms [ type ] = getTransformAttributes ( type ) ;
53
- } ) ;
54
-
55
48
return {
56
49
defs : {
57
50
valObjects : valObjectMeta ,
@@ -83,8 +76,6 @@ exports.get = function() {
83
76
traces : traces ,
84
77
layout : getLayoutAttributes ( ) ,
85
78
86
- transforms : transforms ,
87
-
88
79
frames : getFramesAttributes ( ) ,
89
80
animation : formatAttributes ( animationAttributes ) ,
90
81
@@ -218,21 +209,6 @@ exports.findArrayAttributes = function(trace) {
218
209
exports . crawl ( trace . _module . attributes , callback ) ;
219
210
}
220
211
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
-
236
212
return arrayAttributes ;
237
213
} ;
238
214
@@ -256,41 +232,26 @@ exports.getTraceValObject = function(trace, parts) {
256
232
var i = 1 ; // index to start recursing from
257
233
var moduleAttrs , valObject ;
258
234
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 ] ;
289
243
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
+ }
292
250
}
293
251
252
+ // finally look in the global attributes
253
+ if ( ! valObject ) valObject = baseAttributes [ head ] ;
254
+
294
255
return recurseIntoValObject ( valObject , parts , i ) ;
295
256
} ;
296
257
@@ -567,26 +528,6 @@ function getLayoutAttributes() {
567
528
} ;
568
529
}
569
530
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
-
590
531
function getFramesAttributes ( ) {
591
532
var attrs = {
592
533
frames : extendDeepAll ( { } , frameAttributes )
0 commit comments