Skip to content

Commit

Permalink
feat: Add a blocklyCollapsed CSS class to collapsed blocks' root SVG (#…
Browse files Browse the repository at this point in the history
…8264) (#8308)

* feat: Add a blocklyCollapsed CSS class to collapsed blocks' root SVG (#8264)

* format
  • Loading branch information
ga-fleury authored Jul 22, 2024
1 parent 58abf6e commit 348313a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/block_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,12 @@ export class BlockSvg
if (!collapsed) {
this.updateDisabled();
this.removeInput(collapsedInputName);
dom.removeClass(this.svgGroup_, 'blocklyCollapsed');
return;
}

dom.addClass(this.svgGroup_, 'blocklyCollapsed');

const text = this.toString(internalConstants.COLLAPSE_CHARS);
const field = this.getField(collapsedFieldName);
if (field) {
Expand Down

0 comments on commit 348313a

Please sign in to comment.