UNPKG

@polar/lib-invisible-style

Version:

Provides semantic styling for elements to remove visiblity from them in a detectable fashion that adds programmatic semantics, i.e. whether an element should be considered as visible or not to the user and should hence appear (or be considered) in user in

9 lines (7 loc) 301 B
import Style from 'ol/style/Style' import { Feature } from 'ol' export const InvisibleStyle = new Style() export const isInvisible = (feature: Feature): boolean => feature.getStyle() === InvisibleStyle export const isVisible = (feature: Feature): boolean => feature.getStyle() !== InvisibleStyle