File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -267,8 +267,8 @@ gulp.task('push-release', function (callback) {
267
267
runSequence (
268
268
'push-changes' ,
269
269
'push-tags' ,
270
- 'github-release' ,
271
270
'npm-publish' ,
271
+ 'github-release' ,
272
272
function ( error ) {
273
273
if ( error ) {
274
274
console . log ( error . message ) ;
Original file line number Diff line number Diff line change @@ -243,25 +243,28 @@ class TreeBuilder {
243
243
static _nodeSize ( nodes , width , textRenderer ) {
244
244
var maxWidth = 0 ;
245
245
var maxHeight = 0 ;
246
+ var tmpSvg = document . createElement ( 'svg' ) ;
247
+ document . body . appendChild ( tmpSvg ) ;
248
+
246
249
_ . map ( nodes , function ( n ) {
247
250
var container = document . createElement ( 'div' ) ;
248
251
container . setAttribute ( 'class' , n . class ) ;
249
- container . style . marginLeft = '5px' ;
250
- container . style . paddingTop = '5px' ;
251
252
container . style . visibility = 'hidden' ;
252
253
container . style . maxWidth = width + 'px' ;
253
254
254
255
var text = textRenderer ( n . name , n . extra , n . textClass ) ;
255
256
container . innerHTML = text ;
256
257
257
- document . body . appendChild ( container ) ;
258
+ tmpSvg . appendChild ( container ) ;
258
259
var height = container . offsetHeight ;
259
- document . body . removeChild ( container ) ;
260
+ tmpSvg . removeChild ( container ) ;
260
261
261
262
maxHeight = Math . max ( maxHeight , height ) ;
262
263
n . cHeight = height ;
263
264
n . cWidth = width ;
264
265
} ) ;
266
+ document . body . removeChild ( tmpSvg ) ;
267
+
265
268
return [ width , maxHeight ] ;
266
269
}
267
270
You can’t perform that action at this time.
0 commit comments