()
| 59 | } |
| 60 | |
| 61 | snapshot_scales() { |
| 62 | // Save the state of the scales. |
| 63 | const scales = this.getScales(); |
| 64 | |
| 65 | this.scales_states = Object.keys(scales).reduce((obj, key) => { |
| 66 | obj[key] = scales[key].map((s) => { |
| 67 | return s.get_state(false); |
| 68 | }); |
| 69 | return obj; |
| 70 | }, {}); |
| 71 | } |
| 72 | |
| 73 | getScales(): Dict<ScaleModel[]> { |
| 74 | return this.get('scales'); |