[fix] SVG export for arrows with labels but no arrowheads (#1229)

This PR fixes a bug where arrow shapes without arrowheads would not mask
their labels when exporting images.
This commit is contained in:
Steve Ruiz 2023-05-05 15:17:01 +01:00 committed by GitHub
parent dc16ae1b12
commit f315ea2250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -918,7 +918,7 @@ export class TLArrowUtil extends TLShapeUtil<TLArrowShape> {
const maskId = (shape.id + '_clip').replace(':', '_') const maskId = (shape.id + '_clip').replace(':', '_')
// If we have any arrowheads, then mask the arrowheads // If we have any arrowheads, then mask the arrowheads
if (as || ae) { if (as || ae || labelSize) {
// Create mask for arrowheads // Create mask for arrowheads
// Create defs // Create defs