/// <summary> /// Returns true if this node is visible /// </summary> /// <param name="trueFn"></param> /// <param name="falseFn"></param> public virtual void IsVisible(JFunction trueFn, JFunction falseFn) { this.AddScript("if({0}.isVisible()){{{1}}}else{{{2};}}", this.NodeInstance, trueFn.ToCallScript(this.NodeInstance), falseFn.ToCallScript(this.NodeInstance)); }
/// <summary> /// Returns true if the passed node is an ancestor (at any point) of this node. /// </summary> /// <param name="node"></param> /// <param name="trueFn"></param> /// <param name="falseFn"></param> public virtual void IsAncestor(NodeProxy node, JFunction trueFn, JFunction falseFn) { this.AddScript("if({0}.isAncestor({1})){{{2}}}else{{{3};}}", this.NodeInstance, node.NodeInstance, trueFn.ToCallScript(this.NodeInstance), falseFn.ToCallScript(this.NodeInstance)); }
/// <summary> /// Returns true if this node has one or more child nodes, else false. /// </summary> /// <param name="trueFn"></param> /// <param name="falseFn"></param> public virtual void HasChildNodes(JFunction trueFn, JFunction falseFn) { this.AddScript("if({0}.hasChildNodes()){{{1}}}else{{{2};}}", this.NodeInstance, trueFn.ToCallScript(this.NodeInstance), falseFn.ToCallScript(this.NodeInstance)); }