Interface that is implemented for elements that can determine whether they might be visible in a given clipping rectangle.
Inheritance Hierarchy
IVisibilityTestable
Related Programming Samples
- 09 Item Visibility
- Adjust the visibility check to parts of the node visualization that lie outside of the node bounds
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.IVisibilityTestable
See Also
IVisualCreator,
CanvasComponent,
ICanvasObjectDescriptor,
ICanvasObject,
Complex Custom Indicator Installer,
IVisibilityTestable,
Separating Style and Renderer,
Customizing Predefined Styles,
Virtualization
Methods
Determines whether an element might intersect the visible region for a given context.
Remarks
Conservative implementations can always return
true
.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - ICanvasContext
- The context to determine the visibility for.
- rectangle - Rect
- The visible region clip.
Returns
- ↪boolean
false
if and only if it is safe not to paint the element because it would not affect the given clipping region.
Constants
An implementation of a IVisibilityTestable that always yields true
.
An implementation of a IVisibilityTestable that always yields false
.
Static Methods
Creates an implementation of the interface IVisibilityTestable by using the given function as implementation for its isVisible method.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- isVisible - function(ICanvasContext, Rect):boolean
- A function for IVisibilityTestable's single abstract method isVisible.
Returns
- ↪IVisibilityTestable
- An instance of the IVisibilityTestable interface based on the given function.