* trimmedExtentZoom * Returns the maximum zoom that will fit the given extent in the map viewport, * but zoomed out slightly to account for header, footer, etc. * @param extent Extent Object to fit * @return zoom
(extent)
| 928 | * @return zoom |
| 929 | */ |
| 930 | trimmedExtentZoom(extent) { |
| 931 | // Add 50px overscan experiment, see UISystem.js |
| 932 | // Maybe find a nicer way to include overscan and view padding into places like this. |
| 933 | const trimW = 140; |
| 934 | const trimH = 240; |
| 935 | //const trimW = 40; |
| 936 | //const trimH = 140; |
| 937 | |
| 938 | const viewport = this.context.viewport; |
| 939 | const trimmed = vecSubtract(viewport.dimensions, [trimW, trimH]); |
| 940 | return this.extentZoom(extent, trimmed); |
| 941 | } |
| 942 | |
| 943 | |
| 944 | /** |
no test coverage detected