File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 11# 2.33.1-0 / Unreleased
22 * TODO: tree.hasFocus() more reliable.
3+ * [ Added] ` tree.time() ` , ` tree.timeEnd() ` for debugging.
4+ * [ Fixed] #974 too much output in prodcution mode.
35 * [ Fixed] #973 when use ext-grid in one tree, other tree not use ext-grid has error on click.
46
57# 2.33.0 / 2019-10-29
Original file line number Diff line number Diff line change 403403 // this.debug("_renumberVisibleNodes() ignored.");
404404 return false ;
405405 }
406- window . console . time ( "_renumberVisibleNodes()" ) ;
406+ this . time ( "_renumberVisibleNodes()" ) ;
407407 var i = 0 ,
408408 prevLength = this . visibleNodeList ? this . visibleNodeList . length : 0 ,
409409 visibleNodeList = ( this . visibleNodeList = [ ] ) ;
422422 node . _rowIdx = i ++ ;
423423 visibleNodeList . push ( node ) ;
424424 } ) ;
425- window . console . timeEnd ( "_renumberVisibleNodes()" ) ;
425+ this . timeEnd ( "_renumberVisibleNodes()" ) ;
426426 if ( i !== prevLength ) {
427427 this . _triggerTreeEvent ( "updateViewport" , null , {
428428 reason : "renumber" ,
446446 // tree.debug("no render", tree._enableUpdate);
447447 return ;
448448 }
449- window . console . time ( "redrawViewport()" ) ;
449+ this . time ( "redrawViewport()" ) ;
450450 this . _renumberVisibleNodes ( force ) ;
451451 // Adjust vp.start value to assure the current content is inside:
452452 this . _fixStart ( null , true ) ;
500500 trIdx ++ ;
501501 }
502502 this . isVpUpdating = prevPhase ;
503- window . console . timeEnd ( "redrawViewport()" ) ;
503+ this . timeEnd ( "redrawViewport()" ) ;
504504 } ;
505505
506506 $ . ui . fancytree . registerExtension ( {
Original file line number Diff line number Diff line change 37833783 setOption : function ( optionName , value ) {
37843784 return this . widget . option ( optionName , value ) ;
37853785 } ,
3786+ /**
3787+ * Call console.time() when in debug mode (verbose >= 4).
3788+ *
3789+ * @param {string } label
3790+ */
3791+ time : function ( label ) {
3792+ if ( this . options . debugLevel >= 4 ) {
3793+ window . console . time ( this + " - " + label ) ;
3794+ }
3795+ } ,
3796+ /**
3797+ * Call console.timeEnd() when in debug mode (verbose >= 4).
3798+ *
3799+ * @param {string } label
3800+ */
3801+ timeEnd : function ( label ) {
3802+ if ( this . options . debugLevel >= 4 ) {
3803+ window . console . timeEnd ( this + " - " + label ) ;
3804+ }
3805+ } ,
37863806 /**
37873807 * Return all nodes as nested list of {@link NodeData}.
37883808 *
You can’t perform that action at this time.
0 commit comments