()
| 76 | } |
| 77 | |
| 78 | reset() { |
| 79 | /** |
| 80 | * Reset the scales, delete the PanZoom widget, set the figure |
| 81 | * interaction back to its previous value. |
| 82 | */ |
| 83 | const figure = this.get('figure'); |
| 84 | if (figure) { |
| 85 | figure.set('interaction', this.cached_interaction); |
| 86 | figure.save_changes(); |
| 87 | const panzoom = this.get('_panzoom'); |
| 88 | // Should reset_scales be part of PanZoomModel.close()? |
| 89 | panzoom.reset_scales(); |
| 90 | panzoom.close(); |
| 91 | this.set('_panzoom', null); |
| 92 | this.set('_panning', false); |
| 93 | this.save_changes(); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | save_png() { |
| 98 | /** |
no test coverage detected