1010
1111var d3 = require ( 'd3' ) ;
1212
13- var hasTransition = require ( '../sunburst/helpers' ) . hasTransition ;
1413var helpers = require ( '../sunburst/helpers' ) ;
1514
1615var Lib = require ( '../../lib' ) ;
1716var TEXTPAD = require ( '../bar/constants' ) . TEXTPAD ;
1817var barPlot = require ( '../bar/plot' ) ;
1918var toMoveInsideBar = barPlot . toMoveInsideBar ;
2019var recordMinTextSize = barPlot . recordMinTextSize ;
21-
20+ var clearMinTextSize = barPlot . clearMinTextSize ;
21+ var style = require ( './style' ) . style ;
2222var constants = require ( './constants' ) ;
2323var drawDescendants = require ( './draw_descendants' ) ;
2424var drawAncestors = require ( './draw_ancestors' ) ;
@@ -32,6 +32,8 @@ module.exports = function(gd, cdmodule, transitionOpts, makeOnCompleteCallback)
3232 // updated are removed.
3333 var isFullReplot = ! transitionOpts ;
3434
35+ clearMinTextSize ( 'treemap' , fullLayout ) ;
36+
3537 join = layer . selectAll ( 'g.trace.treemap' )
3638 . data ( cdmodule , function ( cd ) { return cd [ 0 ] . trace . uid ; } ) ;
3739
@@ -41,7 +43,7 @@ module.exports = function(gd, cdmodule, transitionOpts, makeOnCompleteCallback)
4143
4244 join . order ( ) ;
4345
44- if ( hasTransition ( transitionOpts ) ) {
46+ if ( helpers . hasTransition ( transitionOpts ) ) {
4547 if ( makeOnCompleteCallback ) {
4648 // If it was passed a callback to register completion, make a callback. If
4749 // this is created, then it must be executed on completion, otherwise the
@@ -66,6 +68,10 @@ module.exports = function(gd, cdmodule, transitionOpts, makeOnCompleteCallback)
6668 join . each ( function ( cd ) {
6769 plotOne ( gd , cd , this , transitionOpts ) ;
6870 } ) ;
71+
72+ if ( fullLayout . uniformtext . mode ) {
73+ style ( gd ) ;
74+ }
6975 }
7076
7177 if ( isFullReplot ) {
@@ -351,6 +357,7 @@ function plotOne(gd, cd, element, transitionOpts) {
351357 angle : 0 ,
352358 anchor : anchor
353359 } ) ;
360+ transform . fontSize = opts . fontSize ;
354361
355362 if ( offsetDir !== 'center' ) {
356363 var deltaX = ( x1 - x0 ) / 2 - transform . scale * ( textBB . right - textBB . left ) / 2 ;
0 commit comments