@@ -90,28 +90,6 @@ exports.cleanLayout = function(layout) {
90
90
delete ax . autotick ;
91
91
}
92
92
93
- cleanTitle ( ax ) ;
94
- } else if ( polarAttrRegex && polarAttrRegex . test ( key ) ) {
95
- // modifications for polar
96
-
97
- var polar = layout [ key ] ;
98
- cleanTitle ( polar . radialaxis ) ;
99
- } else if ( ternaryAttrRegex && ternaryAttrRegex . test ( key ) ) {
100
- // modifications for ternary
101
-
102
- var ternary = layout [ key ] ;
103
- cleanTitle ( ternary . aaxis ) ;
104
- cleanTitle ( ternary . baxis ) ;
105
- cleanTitle ( ternary . caxis ) ;
106
- } else if ( sceneAttrRegex && sceneAttrRegex . test ( key ) ) {
107
- // modifications for 3D scenes
108
-
109
- var scene = layout [ key ] ;
110
-
111
- // clean axis titles
112
- cleanTitle ( scene . xaxis ) ;
113
- cleanTitle ( scene . yaxis ) ;
114
- cleanTitle ( scene . zaxis ) ;
115
93
}
116
94
}
117
95
@@ -165,9 +143,6 @@ exports.cleanLayout = function(layout) {
165
143
}
166
144
}
167
145
168
- // clean plot title
169
- cleanTitle ( layout ) ;
170
-
171
146
/*
172
147
* Moved from rotate -> orbit for dragmode
173
148
*/
@@ -193,44 +168,6 @@ function cleanAxRef(container, attr) {
193
168
}
194
169
}
195
170
196
- /**
197
- * Cleans up old title attribute structure (flat) in favor of the new one (nested).
198
- *
199
- * @param {Object } titleContainer - an object potentially including deprecated title attributes
200
- */
201
- function cleanTitle ( titleContainer ) {
202
- if ( titleContainer ) {
203
- // title -> title.text
204
- // (although title used to be a string attribute,
205
- // numbers are accepted as well)
206
- if ( typeof titleContainer . title === 'string' || typeof titleContainer . title === 'number' ) {
207
- titleContainer . title = {
208
- text : titleContainer . title
209
- } ;
210
- }
211
-
212
- rewireAttr ( 'titlefont' , 'font' ) ;
213
- rewireAttr ( 'titleposition' , 'position' ) ;
214
- rewireAttr ( 'titleside' , 'side' ) ;
215
- rewireAttr ( 'titleoffset' , 'offset' ) ;
216
- }
217
-
218
- function rewireAttr ( oldAttrName , newAttrName ) {
219
- var oldAttrSet = titleContainer [ oldAttrName ] ;
220
- var newAttrSet = titleContainer . title && titleContainer . title [ newAttrName ] ;
221
-
222
- if ( oldAttrSet && ! newAttrSet ) {
223
- // Ensure title object exists
224
- if ( ! titleContainer . title ) {
225
- titleContainer . title = { } ;
226
- }
227
-
228
- titleContainer . title [ newAttrName ] = titleContainer [ oldAttrName ] ;
229
- delete titleContainer [ oldAttrName ] ;
230
- }
231
- }
232
- }
233
-
234
171
/*
235
172
* cleanData: Make a few changes to the data for backward compatibility
236
173
* before it gets used for anything. Modifies the data traces users provide.
@@ -410,13 +347,6 @@ exports.cleanData = function(data) {
410
347
delete trace . autobiny ;
411
348
delete trace . ybins ;
412
349
}
413
-
414
- cleanTitle ( trace ) ;
415
- if ( trace . colorbar ) cleanTitle ( trace . colorbar ) ;
416
- if ( trace . marker && trace . marker . colorbar ) cleanTitle ( trace . marker . colorbar ) ;
417
- if ( trace . line && trace . line . colorbar ) cleanTitle ( trace . line . colorbar ) ;
418
- if ( trace . aaxis ) cleanTitle ( trace . aaxis ) ;
419
- if ( trace . baxis ) cleanTitle ( trace . baxis ) ;
420
350
}
421
351
} ;
422
352
0 commit comments