()
| 898 | } |
| 899 | |
| 900 | update_paddings() { |
| 901 | // Iterate over the paddings of the marks for each scale and store |
| 902 | // the maximum padding for each scale on the X and Y in |
| 903 | // xPaddingArr and yPaddingArr |
| 904 | |
| 905 | this.xPaddingArr = {}; |
| 906 | this.yPaddingArr = {}; |
| 907 | |
| 908 | _.forEach(this.x_pad_dict, (dict: any, scale_id) => { |
| 909 | let max = 0; |
| 910 | _.forEach(dict, (value: number, key) => { |
| 911 | max = Math.max(max, value); |
| 912 | }); |
| 913 | this.xPaddingArr[scale_id] = max; |
| 914 | }); |
| 915 | |
| 916 | _.forEach(this.y_pad_dict, (dict: any, scale_id) => { |
| 917 | let max = 0; |
| 918 | _.forEach(dict, (value: number, key) => { |
| 919 | max = Math.max(max, value); |
| 920 | }); |
| 921 | this.yPaddingArr[scale_id] = max; |
| 922 | }); |
| 923 | // This is for the figure to relayout everything to account for the |
| 924 | // updated margins. |
| 925 | this.trigger('margin_updated'); |
| 926 | } |
| 927 | |
| 928 | relayout() { |
| 929 | if (this.rendered && !this.relayoutRequested) { |
no outgoing calls
no test coverage detected