Skip to content

Commit

Permalink
Set visible for non empty text
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Aug 30, 2024
1 parent 0d7199f commit 221a320
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/drawLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,11 @@ export class DrawLayer {
if (typeof visible === 'undefined') {
visible = !label.isVisible();
}
label.visible(visible);
// set visible only for non empty text
if (typeof label.getText() !== 'undefined' &&

Check failure on line 836 in src/gui/drawLayer.js

View workflow job for this annotation

GitHub Actions / build

Property 'getText' does not exist on type 'Shape<ShapeConfig> | Group'.
label.getText().text().length !== 0) {

Check failure on line 837 in src/gui/drawLayer.js

View workflow job for this annotation

GitHub Actions / build

Property 'getText' does not exist on type 'Shape<ShapeConfig> | Group'.
label.visible(visible);
}
}

/**
Expand Down

0 comments on commit 221a320

Please sign in to comment.