UNPKG

rlayers

Version:

React Components for OpenLayers

22 lines 609 B
import { Fill } from 'ol/style'; import { default as RBaseStyle } from './RBaseStyle'; /** * A component for adding a fill to a style * * Requires an `RStyle` context */ class RFill extends RBaseStyle { create(props) { this.classProps = RFill.classProps; return new Fill(props); } set(ol) { if (this.context.style.setFill) return this.context.style.setFill(ol); /* istanbul ignore next */ throw new Error('Parent element does not support a fill'); } } RFill.classProps = ['color']; export default RFill; //# sourceMappingURL=RFill.js.map