UNPKG

rlayers

Version:

React Components for OpenLayers

21 lines 602 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 */ export default 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']; //# sourceMappingURL=RFill.js.map