@@ -90,19 +90,6 @@ exports.cleanLayout = function(layout) {
9090 delete ax . autotick ;
9191 }
9292
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 ) ;
10693 } else if ( sceneAttrRegex && sceneAttrRegex . test ( key ) ) {
10794 // modifications for 3D scenes
10895
@@ -130,11 +117,6 @@ exports.cleanLayout = function(layout) {
130117
131118 delete scene . cameraposition ;
132119 }
133-
134- // clean axis titles
135- cleanTitle ( scene . xaxis ) ;
136- cleanTitle ( scene . yaxis ) ;
137- cleanTitle ( scene . zaxis ) ;
138120 }
139121 }
140122
@@ -199,9 +181,6 @@ exports.cleanLayout = function(layout) {
199181 }
200182 }
201183
202- // clean plot title
203- cleanTitle ( layout ) ;
204-
205184 /*
206185 * Moved from rotate -> orbit for dragmode
207186 */
@@ -227,44 +206,6 @@ function cleanAxRef(container, attr) {
227206 }
228207}
229208
230- /**
231- * Cleans up old title attribute structure (flat) in favor of the new one (nested).
232- *
233- * @param {Object } titleContainer - an object potentially including deprecated title attributes
234- */
235- function cleanTitle ( titleContainer ) {
236- if ( titleContainer ) {
237- // title -> title.text
238- // (although title used to be a string attribute,
239- // numbers are accepted as well)
240- if ( typeof titleContainer . title === 'string' || typeof titleContainer . title === 'number' ) {
241- titleContainer . title = {
242- text : titleContainer . title
243- } ;
244- }
245-
246- rewireAttr ( 'titlefont' , 'font' ) ;
247- rewireAttr ( 'titleposition' , 'position' ) ;
248- rewireAttr ( 'titleside' , 'side' ) ;
249- rewireAttr ( 'titleoffset' , 'offset' ) ;
250- }
251-
252- function rewireAttr ( oldAttrName , newAttrName ) {
253- var oldAttrSet = titleContainer [ oldAttrName ] ;
254- var newAttrSet = titleContainer . title && titleContainer . title [ newAttrName ] ;
255-
256- if ( oldAttrSet && ! newAttrSet ) {
257- // Ensure title object exists
258- if ( ! titleContainer . title ) {
259- titleContainer . title = { } ;
260- }
261-
262- titleContainer . title [ newAttrName ] = titleContainer [ oldAttrName ] ;
263- delete titleContainer [ oldAttrName ] ;
264- }
265- }
266- }
267-
268209/*
269210 * cleanData: Make a few changes to the data for backward compatibility
270211 * before it gets used for anything. Modifies the data traces users provide.
@@ -467,13 +408,6 @@ exports.cleanData = function(data) {
467408 delete trace . autobiny ;
468409 delete trace . ybins ;
469410 }
470-
471- cleanTitle ( trace ) ;
472- if ( trace . colorbar ) cleanTitle ( trace . colorbar ) ;
473- if ( trace . marker && trace . marker . colorbar ) cleanTitle ( trace . marker . colorbar ) ;
474- if ( trace . line && trace . line . colorbar ) cleanTitle ( trace . line . colorbar ) ;
475- if ( trace . aaxis ) cleanTitle ( trace . aaxis ) ;
476- if ( trace . baxis ) cleanTitle ( trace . baxis ) ;
477411 }
478412} ;
479413
0 commit comments