Use const in more places

This commit is contained in:
Maximilian Krög
2022-08-09 00:04:31 +02:00
parent bebf2db5ae
commit 5b8d810f80
18 changed files with 108 additions and 110 deletions

View File

@@ -52,12 +52,15 @@ import {getTransformFromProjections, getUserProjection} from './proj.js';
* import Fill from 'ol/style/Fill';
* import Polygon from 'ol/geom/Polygon';
*
* var canvas = document.createElement('canvas');
* var render = toContext(canvas.getContext('2d'),
* { size: [100, 100] });
* const canvas = document.createElement('canvas');
* const render = toContext(
* canvas.getContext('2d'),
* {size: [100, 100]}
* );
* render.setFillStrokeStyle(new Fill({ color: blue }));
* render.drawPolygon(
* new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));
* new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]])
* );
* ```
*
* @param {CanvasRenderingContext2D} context Canvas context.