| 1012 | } |
| 1013 | |
| 1014 | calculateAutoSize() { |
| 1015 | // if offset is used, we don't take up any auto layout space |
| 1016 | if (this.offset_value !== undefined) { |
| 1017 | return 0; |
| 1018 | } else { |
| 1019 | const box = this.getBBox(); |
| 1020 | const side = this.model.get('side'); |
| 1021 | if (side == 'left' || side == 'right') { |
| 1022 | return box.width; |
| 1023 | } |
| 1024 | if (side == 'bottom' || side == 'top') { |
| 1025 | return box.height; |
| 1026 | } |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | getBBox(): DOMRect { |
| 1031 | // To get the bounding box, we don't want to include the gridlines, so we disable them |