PDA

View Full Version : [FIXED][3.0 Core] isVisible Bug



rdewell
9 Apr 2009, 11:51 AM
isVisible should be written like the 2.2 form which is:

isVisible : function(deep) {
return !(this.isStyle(VISIBILITY, HIDDEN) || this.isStyle(DISPLAY, NONE));
}

The current 3.0 core version doesn't work as expected, esp for functions like toggle():

isVisible : function(deep) {
return !this.isStyle(VISIBILITY, HIDDEN) || !this.isStyle(DISPLAY, NONE);
}

aconran
9 Apr 2009, 11:56 AM
Thanks, committed as of rev 254.

mystix
10 Apr 2009, 12:35 PM
isVisible should be written like the 2.2 form which is:

isVisible : function(deep) {
return !(this.isStyle(VISIBILITY, HIDDEN) || this.isStyle(DISPLAY, NONE));
}

The current 3.0 core version doesn't work as expected, esp for functions like toggle():

isVisible : function(deep) {
return !this.isStyle(VISIBILITY, HIDDEN) || !this.isStyle(DISPLAY, NONE);
}

discrete maths 101 -- negation of an OR statement:


isVisible : function(deep) {
return !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE);
}

;)