Skip to content

Commit af91935

Browse files
committed
Website updates
1 parent 7a91313 commit af91935

13 files changed

+304
-19
lines changed

dist/en/main/apidoc/module-ol_interaction_Draw-Draw.html

Lines changed: 225 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<li data-name="finishdrawing"><a href="module-ol_interaction_Draw-Draw.html#finishDrawing">finishDrawing</a>
8080
<li data-name="get"><a href="module-ol_interaction_Draw-Draw.html#get">get</a>
8181
<li data-name="getactive"><a href="module-ol_interaction_Draw-Draw.html#getActive">getActive</a>
82+
<li data-name="getfreehand"><a href="module-ol_interaction_Draw-Draw.html#getFreehand">getFreehand</a>
8283
<li data-name="getkeys"><a href="module-ol_interaction_Draw-Draw.html#getKeys">getKeys</a>
8384
<li data-name="getmap"><a href="module-ol_interaction_Draw-Draw.html#getMap">getMap</a>
8485
<li data-name="getoverlay"><a href="module-ol_interaction_Draw-Draw.html#getOverlay">getOverlay</a>
@@ -91,6 +92,7 @@
9192
<li data-name="removelastpoint"><a href="module-ol_interaction_Draw-Draw.html#removeLastPoint">removeLastPoint</a>
9293
<li data-name="set"><a href="module-ol_interaction_Draw-Draw.html#set">set</a>
9394
<li data-name="setactive"><a href="module-ol_interaction_Draw-Draw.html#setActive">setActive</a>
95+
<li data-name="setfreehand"><a href="module-ol_interaction_Draw-Draw.html#setFreehand">setFreehand</a>
9496
<li data-name="setproperties"><a href="module-ol_interaction_Draw-Draw.html#setProperties">setProperties</a>
9597
<li data-name="un"><a href="module-ol_interaction_Draw-Draw.html#un">un</a>
9698
<li data-name="unset"><a href="module-ol_interaction_Draw-Draw.html#unset">unset</a>
@@ -977,7 +979,7 @@ <h4 class="name">
977979

978980
<div class="tag-source">
979981
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
980-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1392">line 1392</a>
982+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1425">line 1425</a>
981983
</div>
982984

983985
</div>
@@ -1058,7 +1060,7 @@ <h4 class="name">
10581060

10591061
<div class="tag-source">
10601062
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
1061-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1408">line 1408</a>
1063+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1441">line 1441</a>
10621064
</div>
10631065

10641066
</div>
@@ -1414,7 +1416,7 @@ <h4 class="name">
14141416

14151417
<div class="tag-source">
14161418
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
1417-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1457">line 1457</a>
1419+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1490">line 1490</a>
14181420
</div>
14191421

14201422
</div>
@@ -1545,7 +1547,7 @@ <h4 class="name">
15451547

15461548
<div class="tag-source">
15471549
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
1548-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1325">line 1325</a>
1550+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1358">line 1358</a>
15491551
</div>
15501552

15511553
</div>
@@ -1852,6 +1854,96 @@ <h5>Returns:</h5>
18521854

18531855

18541856

1857+
<dt class="">
1858+
1859+
<div class="nameContainer">
1860+
<div class="anchor" id="getFreehand">
1861+
</div>
1862+
<h4 class="name">
1863+
getFreehand<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{boolean}</span>
1864+
1865+
1866+
1867+
</h4>
1868+
1869+
<div class="tag-source">
1870+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
1871+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L646">line 646</a>
1872+
</div>
1873+
1874+
</div>
1875+
1876+
1877+
</dt>
1878+
<dd class="">
1879+
1880+
1881+
1882+
1883+
<div class="description">
1884+
<p>Get if this interaction is in freehand mode.</p>
1885+
</div>
1886+
1887+
1888+
1889+
1890+
1891+
1892+
1893+
1894+
1895+
1896+
1897+
<dl class="details">
1898+
1899+
1900+
1901+
1902+
1903+
1904+
1905+
1906+
1907+
1908+
1909+
1910+
1911+
1912+
1913+
1914+
1915+
1916+
1917+
1918+
1919+
</dl>
1920+
1921+
1922+
1923+
1924+
1925+
1926+
1927+
1928+
1929+
1930+
1931+
1932+
1933+
1934+
1935+
<h5>Returns:</h5>
1936+
Freehand drawing.
1937+
<br />
1938+
1939+
1940+
1941+
1942+
</dd>
1943+
1944+
1945+
1946+
18551947
<dt class="">
18561948

18571949
<div class="nameContainer inherited">
@@ -2050,7 +2142,7 @@ <h4 class="name">
20502142

20512143
<div class="tag-source">
20522144
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
2053-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L613">line 613</a>
2145+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L637">line 637</a>
20542146
</div>
20552147

20562148
</div>
@@ -2418,7 +2510,7 @@ <h4 class="name">
24182510

24192511
<div class="tag-source">
24202512
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
2421-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L624">line 624</a>
2513+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L657">line 657</a>
24222514
</div>
24232515

24242516
</div>
@@ -2887,7 +2979,7 @@ <h4 class="name">
28872979

28882980
<div class="tag-source">
28892981
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
2890-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1314">line 1314</a>
2982+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1347">line 1347</a>
28912983
</div>
28922984

28932985
</div>
@@ -3241,6 +3333,132 @@ <h4 class="name">
32413333

32423334

32433335

3336+
3337+
</dl>
3338+
3339+
3340+
3341+
3342+
3343+
3344+
3345+
3346+
3347+
3348+
3349+
3350+
3351+
</dd>
3352+
3353+
3354+
3355+
3356+
<dt class="">
3357+
3358+
<div class="nameContainer">
3359+
<div class="anchor" id="setFreehand">
3360+
</div>
3361+
<h4 class="name">
3362+
setFreehand<span class="signature">(freehand)</span>
3363+
3364+
3365+
3366+
</h4>
3367+
3368+
<div class="tag-source">
3369+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
3370+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L620">line 620</a>
3371+
</div>
3372+
3373+
</div>
3374+
3375+
3376+
</dt>
3377+
<dd class="">
3378+
3379+
3380+
3381+
3382+
<div class="description">
3383+
<p>Set whether the drawing is done in freehand mode.</p>
3384+
</div>
3385+
3386+
3387+
3388+
3389+
3390+
3391+
3392+
3393+
3394+
3395+
<table class="params">
3396+
<thead>
3397+
<tr>
3398+
3399+
<th>Name</th>
3400+
3401+
3402+
<th>Type</th>
3403+
3404+
<th class="last">Description</th>
3405+
</tr>
3406+
</thead>
3407+
3408+
<tbody>
3409+
3410+
3411+
<tr class="">
3412+
3413+
<td class="name"><code>freehand</code></td>
3414+
3415+
3416+
3417+
<td class="type">
3418+
3419+
3420+
<span class="param-type">boolean</span>
3421+
3422+
3423+
3424+
3425+
</td>
3426+
3427+
3428+
3429+
<td class="description last">
3430+
3431+
<p>Freehand drawing.</p></td>
3432+
</tr>
3433+
3434+
3435+
</tbody>
3436+
</table>
3437+
3438+
3439+
3440+
3441+
<dl class="details">
3442+
3443+
3444+
3445+
3446+
3447+
3448+
3449+
3450+
3451+
3452+
3453+
3454+
3455+
3456+
3457+
3458+
3459+
3460+
3461+
32443462

32453463
</dl>
32463464

dist/en/main/apidoc/module-ol_interaction_Draw.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ <h4 class="name">
205205

206206
<div class="tag-source">
207207
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
208-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1569">line 1569</a>
208+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1602">line 1602</a>
209209
</div>
210210

211211
</div>
@@ -300,7 +300,7 @@ <h4 class="name">
300300

301301
<div class="tag-source">
302302
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js">interaction/Draw.js</a>,
303-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1528">line 1528</a>
303+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Draw.js#L1561">line 1561</a>
304304
</div>
305305

306306
</div>

dist/en/main/apidoc/navigation.tmpl.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,7 @@
25412541
<li data-name="finishdrawing"><a href="module-ol_interaction_Draw-Draw.html#finishDrawing">finishDrawing</a>
25422542
<li data-name="get"><a href="module-ol_interaction_Draw-Draw.html#get">get</a>
25432543
<li data-name="getactive"><a href="module-ol_interaction_Draw-Draw.html#getActive">getActive</a>
2544+
<li data-name="getfreehand"><a href="module-ol_interaction_Draw-Draw.html#getFreehand">getFreehand</a>
25442545
<li data-name="getkeys"><a href="module-ol_interaction_Draw-Draw.html#getKeys">getKeys</a>
25452546
<li data-name="getmap"><a href="module-ol_interaction_Draw-Draw.html#getMap">getMap</a>
25462547
<li data-name="getoverlay"><a href="module-ol_interaction_Draw-Draw.html#getOverlay">getOverlay</a>
@@ -2553,6 +2554,7 @@
25532554
<li data-name="removelastpoint"><a href="module-ol_interaction_Draw-Draw.html#removeLastPoint">removeLastPoint</a>
25542555
<li data-name="set"><a href="module-ol_interaction_Draw-Draw.html#set">set</a>
25552556
<li data-name="setactive"><a href="module-ol_interaction_Draw-Draw.html#setActive">setActive</a>
2557+
<li data-name="setfreehand"><a href="module-ol_interaction_Draw-Draw.html#setFreehand">setFreehand</a>
25562558
<li data-name="setproperties"><a href="module-ol_interaction_Draw-Draw.html#setProperties">setProperties</a>
25572559
<li data-name="un"><a href="module-ol_interaction_Draw-Draw.html#un">un</a>
25582560
<li data-name="unset"><a href="module-ol_interaction_Draw-Draw.html#unset">unset</a>

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/draw-freehand.html

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ <h5 class="modal-title" id="tag-example-title"></h5>
254254
<option value="Circle">Circle</option>
255255
<option value="None">None</option>
256256
</select>
257+
<label for="freehand">Freehand Activated</label>
258+
<input type="checkbox" id="freehand" checked />
257259
</form>
258260

259261
<form method="POST" id="codepen-form" target="_blank" action="https://codesandbox.io/api/v1/sandboxes/define">
@@ -298,14 +300,15 @@ <h5 class="source-heading">main.js</h5>
298300

299301
const typeSelect &#x3D; document.getElementById(&#x27;type&#x27;);
300302

303+
const freehandCheckbox &#x3D; document.getElementById(&#x27;freehand&#x27;);
304+
301305
let draw; // global so we can remove it later
302306
function addInteraction() {
303-
const value &#x3D; typeSelect.value;
304-
if (value !&#x3D;&#x3D; &#x27;None&#x27;) {
307+
if (typeSelect.value !&#x3D;&#x3D; &#x27;None&#x27;) {
305308
draw &#x3D; new Draw({
306309
source: source,
307310
type: typeSelect.value,
308-
freehand: true,
311+
freehand: freehandCheckbox.checked,
309312
});
310313
map.addInteraction(draw);
311314
}
@@ -319,6 +322,15 @@ <h5 class="source-heading">main.js</h5>
319322
addInteraction();
320323
};
321324

325+
/**
326+
* Handle change event.
327+
*/
328+
freehandCheckbox.onchange &#x3D; function () {
329+
if (draw) {
330+
draw.setFreehand(freehandCheckbox.checked);
331+
}
332+
};
333+
322334
addInteraction();
323335
</code></pre>
324336
</div>
@@ -348,6 +360,8 @@ <h5 class="source-heading">index.html</h5>
348360
&lt;option value&#x3D;&quot;Circle&quot;&gt;Circle&lt;/option&gt;
349361
&lt;option value&#x3D;&quot;None&quot;&gt;None&lt;/option&gt;
350362
&lt;/select&gt;
363+
&lt;label for&#x3D;&quot;freehand&quot;&gt;Freehand Activated&lt;/label&gt;
364+
&lt;input type&#x3D;&quot;checkbox&quot; id&#x3D;&quot;freehand&quot; checked /&gt;
351365
&lt;/form&gt;
352366

353367
&lt;script type="module" src="main.js"&gt;&lt;/script&gt;

0 commit comments

Comments
 (0)