1
0
Fork 0

fix(react-components): Accept data-render-always attributes on points

This commit is contained in:
Joost De Cock 2023-09-13 11:58:00 +02:00
parent 5c99791728
commit b7b543fda0

View file

@ -3,8 +3,11 @@ import React from 'react'
import { withinPartBounds } from './utils.mjs'
export const Point = ({ stackName, partName, pointName, part, point, components, t }) => {
// Don't include points outside the part bounding box
if (!withinPartBounds(point, part)) return null
/*
* Don't include points outside the part bounding box
* Unless the `data-render-always` attribute is set
*/
if (!withinPartBounds(point, part) && !point.attributes.list['data-render-always']) return null
// Get potentially swizzled components
const { Circle, Text } = components