Skip to content

Commit 9ddc3b4

Browse files
committed
Website updates
1 parent eca51f6 commit 9ddc3b4

File tree

16 files changed

+294
-20
lines changed

16 files changed

+294
-20
lines changed

dist/en/main/apidoc/module-ol_interaction_Snap-Snap.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h4 class="name">
175175

176176
<div class="tag-source">
177177
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js">interaction/Snap.js</a>,
178-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L110">line 110</a>
178+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L119">line 119</a>
179179
</div>
180180

181181
</div>
@@ -531,7 +531,7 @@ <h4 class="name">
531531

532532
<div class="tag-source">
533533
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js">interaction/Snap.js</a>,
534-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L238">line 238</a>
534+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L254">line 254</a>
535535
</div>
536536

537537
</div>
@@ -1600,7 +1600,7 @@ <h4 class="name">
16001600

16011601
<div class="tag-source">
16021602
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js">interaction/Snap.js</a>,
1603-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L297">line 297</a>
1603+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L326">line 326</a>
16041604
</div>
16051605

16061606
</div>
@@ -2065,7 +2065,7 @@ <h4 class="name">
20652065

20662066
<div class="tag-source">
20672067
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js">interaction/Snap.js</a>,
2068-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L374">line 374</a>
2068+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/interaction/Snap.js#L414">line 414</a>
20692069
</div>
20702070

20712071
</div>

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

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<li data-name="options"><a href="module-ol_interaction_Snap.html#~Options">Options</a>
7575
<li data-name="result"><a href="module-ol_interaction_Snap.html#~Result">Result</a>
7676
<li data-name="segmentdata"><a href="module-ol_interaction_Snap.html#~SegmentData">SegmentData</a>
77+
<li data-name="snappedinfo"><a href="module-ol_interaction_Snap.html#~SnappedInfo">SnappedInfo</a>
7778
</ul>
7879
</div>
7980
<li class="loading">Loading …
@@ -648,6 +649,184 @@ <h5 class="subsection-title">Properties:</h5>
648649

649650

650651

652+
653+
654+
</dl>
655+
656+
657+
658+
</dd>
659+
660+
661+
662+
<dt class="">
663+
<div class="nameContainer">
664+
<div class="anchor" id="~SnappedInfo">
665+
</div>
666+
<h4 class="name">
667+
SnappedInfo<span class="type-signature type object">{Object}</span>
668+
669+
670+
</h4>
671+
</div>
672+
673+
</dt>
674+
<dd class="">
675+
676+
<div class="description">
677+
<p>Information about the last snapped state.</p>
678+
</div>
679+
680+
681+
682+
<dl class="details">
683+
684+
685+
<h5 class="subsection-title">Properties:</h5>
686+
687+
<dl>
688+
689+
<table class="props">
690+
<thead>
691+
<tr>
692+
693+
<th>Name</th>
694+
695+
696+
<th>Type</th>
697+
698+
<th class="last">Description</th>
699+
</tr>
700+
</thead>
701+
702+
<tbody>
703+
704+
705+
<tr>
706+
707+
<td class="name"><code>vertex</code></td>
708+
709+
710+
<td class="type">
711+
712+
713+
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>
714+
|
715+
716+
<span class="param-type">null</span>
717+
718+
719+
720+
721+
</td>
722+
723+
<td class="description last">
724+
<p>The snapped vertex.</p>
725+
726+
</td>
727+
</tr>
728+
729+
730+
731+
<tr>
732+
733+
<td class="name"><code>vertexPixel</code></td>
734+
735+
736+
<td class="type">
737+
738+
739+
<span class="param-type"><a href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>
740+
|
741+
742+
<span class="param-type">null</span>
743+
744+
745+
746+
747+
</td>
748+
749+
<td class="description last">
750+
<p>The pixel of the snapped vertex.</p>
751+
752+
</td>
753+
</tr>
754+
755+
756+
757+
<tr>
758+
759+
<td class="name"><code>feature</code></td>
760+
761+
762+
<td class="type">
763+
764+
765+
<span class="param-type"><a href="module-ol_Feature-Feature.html">Feature</a></span>
766+
|
767+
768+
<span class="param-type">null</span>
769+
770+
771+
772+
773+
</td>
774+
775+
<td class="description last">
776+
<p>The feature being snapped.</p>
777+
778+
</td>
779+
</tr>
780+
781+
782+
783+
<tr>
784+
785+
<td class="name"><code>segment</code></td>
786+
787+
788+
<td class="type">
789+
790+
791+
<span class="param-type">Array&lt;<a href="module-ol_coordinate.html#~Coordinate">Coordinate</a>></span>
792+
|
793+
794+
<span class="param-type">null</span>
795+
796+
797+
798+
799+
</td>
800+
801+
<td class="description last">
802+
<p>Segment, or <code>null</code> if snapped to a vertex.</p>
803+
804+
</td>
805+
</tr>
806+
807+
808+
</tbody>
809+
</table></dl>
810+
811+
812+
813+
814+
815+
816+
817+
818+
819+
820+
821+
822+
823+
824+
825+
826+
827+
828+
829+
651830

652831

653832
</dl>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,6 +3172,7 @@
31723172
<li data-name="options"><a href="module-ol_interaction_Snap.html#~Options">Options</a>
31733173
<li data-name="result"><a href="module-ol_interaction_Snap.html#~Result">Result</a>
31743174
<li data-name="segmentdata"><a href="module-ol_interaction_Snap.html#~SegmentData">SegmentData</a>
3175+
<li data-name="snappedinfo"><a href="module-ol_interaction_Snap.html#~SnappedInfo">SnappedInfo</a>
31753176
</ul>
31763177
</div>
31773178
<li class="item item-class" data-longname="module:ol/interaction/Translate~Translate" data-name="ol/interaction/translate">

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/snap.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ <h5 class="modal-title" id="tag-example-title"></h5>
260260
</div>
261261
</div>
262262
<div id="map" class="map"></div>
263+
<span id="snapped">Snapped: false</span>
263264
<form id="options-form" autocomplete="off">
264265
<div class="radio">
265266
<label>
@@ -432,6 +433,19 @@ <h5 class="source-heading">main.js</h5>
432433
const snap &#x3D; new Snap({
433434
source: vector.getSource(),
434435
});
436+
437+
const snappedElement &#x3D; document.getElementById(&#x27;snapped&#x27;);
438+
439+
snap.on(&#x27;snap&#x27;, () &#x3D;&gt; {
440+
document.getElementById(&#x27;map&#x27;).style.cursor &#x3D; &#x27;grabbing&#x27;;
441+
snappedElement.innerHTML &#x3D; &#x27;Snapped: true&#x27;;
442+
});
443+
444+
snap.on(&#x27;unsnap&#x27;, () &#x3D;&gt; {
445+
document.getElementById(&#x27;map&#x27;).style.cursor &#x3D; &#x27;default&#x27;;
446+
snappedElement.innerHTML &#x3D; &#x27;Snapped: false&#x27;;
447+
});
448+
435449
map.addInteraction(snap);
436450
</code></pre>
437451
</div>
@@ -453,6 +467,7 @@ <h5 class="source-heading">index.html</h5>
453467
&lt;/head&gt;
454468
&lt;body&gt;
455469
&lt;div id&#x3D;&quot;map&quot; class&#x3D;&quot;map&quot;&gt;&lt;/div&gt;
470+
&lt;span id&#x3D;&quot;snapped&quot;&gt;Snapped: false&lt;/span&gt;
456471
&lt;form id&#x3D;&quot;options-form&quot; autocomplete&#x3D;&quot;off&quot;&gt;
457472
&lt;div class&#x3D;&quot;radio&quot;&gt;
458473
&lt;label&gt;

dist/en/main/examples/snap.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.

0 commit comments

Comments
 (0)