(view: Mark)
| 809 | } |
| 810 | |
| 811 | remove_mark(view: Mark) { |
| 812 | // Called when a mark is removed from the mark list. |
| 813 | const model = view.model; |
| 814 | model.off('redraw_legend', null, this); |
| 815 | model.off('data_updated', null, this); |
| 816 | model.off('scales_updated', null, this); |
| 817 | model.off('mark_padding_updated', null, this); |
| 818 | |
| 819 | const scale_models = model.getScales(); |
| 820 | this.remove_from_padding_dict( |
| 821 | this.x_pad_dict, |
| 822 | view, |
| 823 | scale_models[model.get_key_for_orientation('horizontal')] |
| 824 | ); |
| 825 | this.remove_from_padding_dict( |
| 826 | this.y_pad_dict, |
| 827 | view, |
| 828 | scale_models[model.get_key_for_orientation('vertical')] |
| 829 | ); |
| 830 | view.remove(); |
| 831 | } |
| 832 | |
| 833 | async add_mark(model: MarkModel) { |
| 834 | model.state_change.then(() => { |
nothing calls this directly
no test coverage detected