Skip to content

Commit 13b65cf

Browse files
committed
Update documentation
1 parent f180cde commit 13b65cf

39 files changed

+185
-112
lines changed

docs/annotations__AnnotationManager.js.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ <h1 class="page-title">Source: annotations/_AnnotationManager.js</h1>
5050
const { Marker, Markup } = Enums
5151

5252
class _AnnotationManager {
53-
constructor ({ map, pyramid } = {}) {
53+
constructor ({ map, pyramid, drawingSource } = {}) {
5454
const markupManager = new _MarkupManager({
5555
map,
5656
pyramid,
57+
drawingSource,
5758
formatters: {
5859
[Marker.Arrow]: arrowFormat,
5960
[Markup.Measurement]: measurementFormat,
@@ -149,6 +150,16 @@ <h1 class="page-title">Source: annotations/_AnnotationManager.js</h1>
149150
this.props.markupManager.setVisible(isVisible)
150151
}
151152

153+
/**
154+
* Set markup visibility.
155+
*
156+
* @param {string} id The markup id
157+
* @param {boolean} isVisible The markup visibility
158+
*/
159+
setMarkupVisibility (id, isVisible) {
160+
this.props.markupManager.setVisibility(id, isVisible)
161+
}
162+
152163
onAdd (feature) {
153164
/**
154165
* Add properties to ROI feature before triggering
@@ -217,7 +228,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
217228
<br class="clear">
218229

219230
<footer>
220-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
231+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
221232
</footer>
222233

223234
<script> prettyPrint(); </script>

docs/annotations_markers_arrow.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
211211
<br class="clear">
212212

213213
<footer>
214-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
214+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
215215
</footer>
216216

217217
<script> prettyPrint(); </script>

docs/annotations_markups__MarkupManager.js.html

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ <h1 class="page-title">Source: annotations/markups/_MarkupManager.js</h1>
4343
import defaultStyles from '../styles'
4444

4545
class _MarkupManager {
46-
constructor ({ map, pyramid, formatters, onClick, onStyle } = {}) {
46+
constructor ({ map, pyramid, drawingSource, formatters, onClick, onStyle } = {}) {
4747
this._map = map
4848
this._pyramid = pyramid
4949
this._formatters = formatters
50+
this._drawingSource = drawingSource;
5051

5152
this.onClick = onClick
5253
this.onStyle = onStyle
@@ -138,6 +139,34 @@ <h1 class="page-title">Source: annotations/markups/_MarkupManager.js</h1>
138139
return id
139140
}
140141

142+
/**
143+
* Set markup visibility.
144+
*
145+
* @param {string} id The markup id
146+
* @param {boolean} isVisible The markup visibility
147+
*/
148+
setVisibility (id, isVisible) {
149+
const markup = this.get(id)
150+
if (!markup) {
151+
return;
152+
}
153+
154+
const links = this._links.getArray()
155+
const link = links.find((feature) => feature.getId() === id)
156+
157+
const feature = this._drawingSource.getFeatureById(id);
158+
159+
if (!isVisible) {
160+
this._map.removeOverlay(markup.overlay)
161+
this._links.remove(link)
162+
} else {
163+
this._map.addOverlay(markup.overlay)
164+
this._drawLink(feature)
165+
}
166+
167+
return isVisible
168+
}
169+
141170
/**
142171
* Creates a new markup
143172
*
@@ -464,7 +493,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
464493
<br class="clear">
465494

466495
<footer>
467-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
496+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
468497
</footer>
469498

470499
<script> prettyPrint(); </script>

docs/annotations_markups_measurement.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
117117
<br class="clear">
118118

119119
<footer>
120-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
120+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
121121
</footer>
122122

123123
<script> prettyPrint(); </script>

docs/annotations_markups_textEvaluation.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
175175
<br class="clear">
176176

177177
<footer>
178-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
178+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
179179
</footer>
180180

181181
<script> prettyPrint(); </script>

docs/annotations_markups_utils_getShortestLineBetweenOverlayAndFeature.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
8787
<br class="clear">
8888

8989
<footer>
90-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
90+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
9191
</footer>
9292

9393
<script> prettyPrint(); </script>

docs/api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
125125
<br class="clear">
126126

127127
<footer>
128-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
128+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
129129
</footer>
130130

131131
<script> prettyPrint(); </script>

docs/channel.BlendingInformation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
162162
<br class="clear">
163163

164164
<footer>
165-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
165+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
166166
</footer>
167167

168168
<script> prettyPrint(); </script>

docs/channel._Channel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
17601760
<br class="clear">
17611761

17621762
<footer>
1763-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
1763+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
17641764
</footer>
17651765

17661766
<script> prettyPrint(); </script>

docs/channel.js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ <h1 class="page-title">Source: channel.js</h1>
631631
imagePixelSpacings.push(pixelSpacing)
632632

633633
physicalSizes.push([
634-
(totalPixelMatrixColumns * pixelSpacing[0]).toFixed(4),
635-
(totalPixelMatrixRows * pixelSpacing[1]).toFixed(4)
634+
(totalPixelMatrixColumns * pixelSpacing[1]).toFixed(4),
635+
(totalPixelMatrixRows * pixelSpacing[0]).toFixed(4)
636636
])
637637
/*
638638
* Compute the resolution at each pyramid level, since the zoom
@@ -845,7 +845,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="api.ht
845845
<br class="clear">
846846

847847
<footer>
848-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Oct 06 2021 05:27:33 GMT-0400 (Eastern Daylight Time)
848+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Oct 15 2021 08:06:40 GMT-0400 (Eastern Daylight Time)
849849
</footer>
850850

851851
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)