@ -133,21 +133,34 @@ Group.prototype.setData = function(data) {
}
if ( data && data . nestedGroups ) {
if ( data . showNested == false ) {
this . showNested = false ;
} else {
this . showNested = true ;
if ( ! this . nestedGroups || this . nestedGroups != data . nestedGroups ) {
this . nestedGroups = data . nestedGroups ;
}
if ( data . showNested !== undefined || this . showNested === undefined ) {
if ( data . showNested == false ) {
this . showNested = false ;
} else {
this . showNested = true ;
}
}
util . addClassName ( this . dom . label , 'vis-nesting-group' ) ;
var collapsedDirClassName = this . itemSet . options . rtl ? 'collapsed-rtl' : 'collapsed'
if ( this . showNested ) {
util . removeClassName ( this . dom . label , 'collapsed' ) ;
util . removeClassName ( this . dom . label , collapsedDirClassName ) ;
util . addClassName ( this . dom . label , 'expanded' ) ;
} else {
util . removeClassName ( this . dom . label , 'expanded' ) ;
var collapsedDirClassName = this . itemSet . options . rtl ? 'collapsed-rtl' : 'collapsed'
util . addClassName ( this . dom . label , collapsedDirClassName ) ;
}
} else if ( this . nestedGroups ) {
this . nestedGroups = null ;
var collapsedDirClassName = this . itemSet . options . rtl ? 'collapsed-rtl' : 'collapsed'
util . removeClassName ( this . dom . label , collapsedDirClassName ) ;
util . removeClassName ( this . dom . label , 'expanded' ) ;
util . removeClassName ( this . dom . label , 'vis-nesting-group' ) ;
}
if ( data && data . nestedInGroup ) {