Skip to content

Commit 1f05fd8

Browse files
committed
Flow Fixes
1 parent 5e2f1c3 commit 1f05fd8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/components/FacetController.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@ class FacetController extends React.Component<Props, State> {
148148
originalAnnotations: Array<Object>
149149
}) => {
150150
const frameType = child.type.displayName
151+
const annotations = this.generateChildAnnotations({
152+
state,
153+
originalAnnotations
154+
})
151155
const customProps = { ...props, annotations }
152156

153157
if (!frameType) {
154158
return React.cloneElement(child, { facetProps: customProps })
155159
}
156-
const annotations = this.generateChildAnnotations({
157-
state,
158-
originalAnnotations
159-
})
160160

161161
// pieceHoverAnnotation could be an object, so we need to be explicit in checking for true
162162
if (props.hoverAnnotation === true || props.pieceHoverAnnotation === true) {

src/components/Frame.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type Props = {
5959
adjustedSize?: Array<number>,
6060
renderPipeline: Object,
6161
projectedCoordinateNames: Object,
62-
matte?: Node,
62+
matte?: boolean | Object | Node | Function,
6363
axes?: Array<AxisType>,
6464
axesTickLines?: Node,
6565
renderOrder: $ReadOnlyArray<| "pieces"
@@ -228,17 +228,17 @@ class Frame extends React.Component<Props, State> {
228228
marginGraphic = matte({ size, margin })
229229
} else if (React.isValidElement(matte)) {
230230
marginGraphic = matte
231-
} else if (matte) {
231+
} else if (matte === true) {
232232
marginGraphic = (
233233
<path
234234
fill="white"
235235
transform={`translate(${-margin.left},${-margin.top})`}
236236
d={drawMarginPath({
237237
margin,
238238
size: size,
239-
inset: matte.inset
239+
inset: 0
240240
})}
241-
className="xyframe-matte"
241+
className={`${name}-matte`}
242242
/>
243243
)
244244
}

0 commit comments

Comments
 (0)