Merge pull request #550 from VladimirTechMan/master

Simpler code logic for Node._isVisible()
This commit is contained in:
Anton Lavrenov 2019-01-21 19:30:39 -05:00 committed by GitHub
commit 20f07dd3ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -864,15 +864,10 @@ export abstract class Node {
var visible = this.visible(),
parent = this.getParent();
if (relativeTo === parent && visible === 'inherit') {
return true;
} else if (relativeTo === parent) {
return visible;
}
// the following conditions are a simplification of the truth table above.
// please modify carefully
if (visible === 'inherit') {
if (parent) {
if (parent && parent !== relativeTo) {
return parent._isVisible(relativeTo);
} else {
return true;