function remeasure()

in packages/react-heat-streams/src/components/CategoryChart/ValueText.tsx [58:72]


		function remeasure() {
			if (!textElement) {
				return
			}
			const box = textElement.getBBox()
			const spaceNeeded = box.width + SIDE_PADS

			if (width > SANE_MIN_WIDTH) {
				textElement.setAttribute('fill', color)
				const textContent = width >= spaceNeeded ? text : '…'
				textElement.textContent = textContent
			} else {
				textElement.setAttribute('fill', 'transparent')
			}
		},