1.1.0-alpha.1 • Published 3 months ago

@polar/lib-invisible-style v1.1.0-alpha.1

Weekly downloads
-
License
EUPL-1.2
Repository
github
Last release
3 months ago

invisibleStyle

Exports a style for vector layer features that results in invisibility. Plugins that work with feature visibility ought to use this package to keep them interoperable.

import { InvisibleStyle, isInvisible, isVisible } from '@polar/lib-invisible-style'

// making feature invisible
feature.setStyle(InvisibleStyle)

// making feature visible
feature.setStyle(undefined)

// checking if a feature is (in)visible
isInvisible(feature) // true or false
isVisible(feature)