Appearance
StyleRule 
Controller class for a style rule, used to update and manage the attributes and selectors associated with the rule.
styleRule.destroy() 
Delete the rule. After this is called, a call to any method on this object will throw an error.
Returns
-  
Promise<void> 
styleRule.getId() 
Returns the unique positive integer rule id associated with the rule.
Returns
-  
number 
styleRule.getIndex() 
Retrieve the position of the rule in the internal rule list. Rules with a higher index are applied after rules with a lower index.
Returns
-  
number 
styleRule.refresh() 
Refresh the rule for all nodes.
Returns
-  
Promise<void> 
styleRule.setIndex(index) 
Assign the position of the rule in the internal rule list. Rules with a higher index are applied after rules with a lower index.
Arguments
- index 
number 
Returns
-  
Promise<void> 
styleRule.update(options) 
Updates the attributes and selectors associated with the rule.
Arguments
- options
- edgeAttributes(optional) 
EdgeAttributesValue - edgeDependencies(optional) 
EdgeDependencies - edgeOutput(optional) 
EdgeOutput - edgeSelector(optional) 
EdgeSelector|null - fullOverwrite(optional) 
boolean[=false]Indicates if the specified attributes should be merged with current ones (false) or if the specified attributes should entirely replace the current ones. - nodeAttributes(optional) 
NodeAttributesValue - nodeDependencies(optional) 
NodeDependencies - nodeOutput(optional) 
NodeOutput - nodeSelector(optional) 
NodeSelector|null 
 - edgeAttributes(optional) 
 
Returns
-  
Promise<void> 
styleRule.whenApplied() 
Call the specified function when the rule is applied for the first time.
Returns
-  
Promise<StyleRule>