npm.io
3.0.0 • Published 1 year ago

@polar/lib-invisible-style

Licence
EUPL-1.2
Version
3.0.0
Deps
0
Size
15 kB
Vulns
0
Weekly
0
Stars
51

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)

Keywords