@vaadin/bundles 25.0.0-alpha3 → 25.0.0-alpha5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules_ol_ImageCanvas_js.js +76 -83
- package/node_modules_ol_ImageCanvas_js.js.map +1 -1
- package/node_modules_ol_TileRange_js.js +128 -110
- package/node_modules_ol_TileRange_js.js.map +1 -1
- package/node_modules_ol_Tile_js.js +279 -0
- package/node_modules_ol_Tile_js.js.map +1 -0
- package/node_modules_ol_VectorRenderTile_js.js +428 -143
- package/node_modules_ol_VectorRenderTile_js.js.map +1 -1
- package/node_modules_ol_VectorTile_js.js +405 -119
- package/node_modules_ol_VectorTile_js.js.map +1 -1
- package/node_modules_ol_control_MousePosition_js.js +327 -0
- package/node_modules_ol_control_MousePosition_js.js.map +1 -0
- package/node_modules_ol_control_ZoomToExtent_js.js +118 -0
- package/node_modules_ol_control_ZoomToExtent_js.js.map +1 -0
- package/node_modules_ol_events_SnapEvent_js.js +79 -0
- package/node_modules_ol_events_SnapEvent_js.js.map +1 -0
- package/node_modules_ol_featureloader_js.js +205 -0
- package/node_modules_ol_featureloader_js.js.map +1 -0
- package/node_modules_ol_geom_Circle_js.js +300 -0
- package/node_modules_ol_geom_Circle_js.js.map +1 -0
- package/node_modules_ol_geom_GeometryCollection_js.js +369 -0
- package/node_modules_ol_geom_GeometryCollection_js.js.map +1 -0
- package/node_modules_ol_geom_MultiPoint_js.js +228 -0
- package/node_modules_ol_geom_MultiPoint_js.js.map +1 -0
- package/node_modules_ol_geom_flat_center_js.js +47 -0
- package/node_modules_ol_geom_flat_center_js.js.map +1 -0
- package/node_modules_ol_geom_flat_geodesic_js.js +123 -88
- package/node_modules_ol_geom_flat_geodesic_js.js.map +1 -1
- package/node_modules_ol_geom_flat_interpolate_js.js +230 -0
- package/node_modules_ol_geom_flat_interpolate_js.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a0.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a0.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a1.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a1.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a2.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a2.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a3.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a3.js.map +1 -0
- package/node_modules_ol_geom_flat_length_js-_375a4.js +58 -0
- package/node_modules_ol_geom_flat_length_js-_375a4.js.map +1 -0
- package/node_modules_ol_geom_flat_linechunk_js.js +76 -0
- package/node_modules_ol_geom_flat_linechunk_js.js.map +1 -0
- package/node_modules_ol_geom_flat_straightchunk_js.js +68 -0
- package/node_modules_ol_geom_flat_straightchunk_js.js.map +1 -0
- package/node_modules_ol_geom_flat_textpath_js.js +178 -0
- package/node_modules_ol_geom_flat_textpath_js.js.map +1 -0
- package/node_modules_ol_interaction_DblClickDragZoom_js.js +285 -0
- package/node_modules_ol_interaction_DblClickDragZoom_js.js.map +1 -0
- package/node_modules_ol_interaction_DragAndDrop_js.js +351 -0
- package/node_modules_ol_interaction_DragAndDrop_js.js.map +1 -0
- package/node_modules_ol_interaction_DragRotateAndZoom_js.js +159 -0
- package/node_modules_ol_interaction_DragRotateAndZoom_js.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49290.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49290.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49291.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49291.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49292.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49292.js.map +1 -0
- package/node_modules_ol_layer_Vector_js-_49293.js +110 -0
- package/node_modules_ol_layer_Vector_js-_49293.js.map +1 -0
- package/node_modules_ol_loadingstrategy_js.js +95 -0
- package/node_modules_ol_loadingstrategy_js.js.map +1 -0
- package/node_modules_ol_render_VectorContext_js-_3ad60.js +144 -0
- package/node_modules_ol_render_VectorContext_js-_3ad60.js.map +1 -0
- package/node_modules_ol_render_VectorContext_js-_3ad61.js +144 -0
- package/node_modules_ol_render_VectorContext_js-_3ad61.js.map +1 -0
- package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js +372 -0
- package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js.map +1 -0
- package/node_modules_ol_render_canvas_ImageBuilder_js.js +318 -0
- package/node_modules_ol_render_canvas_ImageBuilder_js.js.map +1 -0
- package/node_modules_ol_render_canvas_Instruction_js.js +66 -0
- package/node_modules_ol_render_canvas_Instruction_js.js.map +1 -0
- package/node_modules_ol_render_canvas_LineStringBuilder_js.js +187 -0
- package/node_modules_ol_render_canvas_LineStringBuilder_js.js.map +1 -0
- package/node_modules_ol_render_canvas_PolygonBuilder_js.js +276 -0
- package/node_modules_ol_render_canvas_PolygonBuilder_js.js.map +1 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js +156 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js.map +1 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js +156 -0
- package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js.map +1 -0
- package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js +301 -0
- package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js.map +1 -0
- package/node_modules_ol_renderer_Layer_js.js +219 -0
- package/node_modules_ol_renderer_Layer_js.js.map +1 -0
- package/node_modules_ol_source_Source_js.js +256 -0
- package/node_modules_ol_source_Source_js.js.map +1 -0
- package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js +318 -0
- package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js.map +1 -0
- package/node_modules_ol_source_VectorEventType_js.js +80 -0
- package/node_modules_ol_source_VectorEventType_js.js.map +1 -0
- package/node_modules_ol_structs_RBush_js.js +242 -0
- package/node_modules_ol_structs_RBush_js.js.map +1 -0
- package/node_modules_ol_style_js.js +2 -1
- package/node_modules_ol_style_js.js.map +1 -1
- package/node_modules_rbush_rbush_min_js.js +16 -0
- package/node_modules_rbush_rbush_min_js.js.map +1 -0
- package/package.json +142 -146
- package/vaadin-bundle.json +2447 -2352
- package/vaadin.js +52246 -63791
- package/vaadin.js.map +1 -1
- package/vendors-node_modules_dompurify_dist_purify_es_mjs.js +1364 -0
- package/vendors-node_modules_dompurify_dist_purify_es_mjs.js.map +1 -0
- package/vendors-node_modules_dompurify_dist_purify_js.js +26 -21
- package/vendors-node_modules_dompurify_dist_purify_js.js.map +1 -1
- package/vendors-node_modules_marked_lib_marked_esm_js.js +2205 -0
- package/vendors-node_modules_marked_lib_marked_esm_js.js.map +1 -0
- package/vendors-node_modules_marked_lib_marked_umd_js.js +2164 -2556
- package/vendors-node_modules_marked_lib_marked_umd_js.js.map +1 -1
- package/vendors-node_modules_ol_Feature_js.js +360 -0
- package/vendors-node_modules_ol_Feature_js.js.map +1 -0
- package/vendors-node_modules_ol_Geolocation_js.js +352 -293
- package/vendors-node_modules_ol_Geolocation_js.js.map +1 -1
- package/vendors-node_modules_ol_ImageTile_js.js +494 -0
- package/vendors-node_modules_ol_ImageTile_js.js.map +1 -0
- package/vendors-node_modules_ol_Overlay_js.js +606 -0
- package/vendors-node_modules_ol_Overlay_js.js.map +1 -0
- package/vendors-node_modules_ol_control_FullScreen_js.js +417 -0
- package/vendors-node_modules_ol_control_FullScreen_js.js.map +1 -0
- package/vendors-node_modules_ol_control_OverviewMap_js.js +711 -0
- package/vendors-node_modules_ol_control_OverviewMap_js.js.map +1 -0
- package/vendors-node_modules_ol_control_ScaleLine_js.js +509 -0
- package/vendors-node_modules_ol_control_ScaleLine_js.js.map +1 -0
- package/vendors-node_modules_ol_control_ZoomSlider_js.js +418 -0
- package/vendors-node_modules_ol_control_ZoomSlider_js.js.map +1 -0
- package/vendors-node_modules_ol_control_js.js +490 -0
- package/vendors-node_modules_ol_control_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_LineString_js.js +574 -0
- package/vendors-node_modules_ol_geom_LineString_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_MultiLineString_js.js +405 -0
- package/vendors-node_modules_ol_geom_MultiLineString_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_MultiPolygon_js.js +773 -0
- package/vendors-node_modules_ol_geom_MultiPolygon_js.js.map +1 -0
- package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js +769 -0
- package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js.map +1 -0
- package/vendors-node_modules_ol_index_js.js +526 -675
- package/vendors-node_modules_ol_index_js.js.map +1 -1
- package/vendors-node_modules_ol_interaction_Draw_js.js +2777 -0
- package/vendors-node_modules_ol_interaction_Draw_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Extent_js.js +586 -0
- package/vendors-node_modules_ol_interaction_Extent_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Link_js.js +489 -0
- package/vendors-node_modules_ol_interaction_Link_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Modify_js.js +1841 -0
- package/vendors-node_modules_ol_interaction_Modify_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Select_js.js +623 -0
- package/vendors-node_modules_ol_interaction_Select_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Snap_js.js +982 -0
- package/vendors-node_modules_ol_interaction_Snap_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_Translate_js.js +466 -0
- package/vendors-node_modules_ol_interaction_Translate_js.js.map +1 -0
- package/vendors-node_modules_ol_interaction_js.js +872 -0
- package/vendors-node_modules_ol_interaction_js.js.map +1 -0
- package/vendors-node_modules_ol_layer_Graticule_js.js +1374 -989
- package/vendors-node_modules_ol_layer_Graticule_js.js.map +1 -1
- package/vendors-node_modules_ol_render_Feature_js.js +546 -0
- package/vendors-node_modules_ol_render_Feature_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js +897 -0
- package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_Builder_js.js +907 -0
- package/vendors-node_modules_ol_render_canvas_Builder_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js +539 -0
- package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_Executor_js.js +1715 -0
- package/vendors-node_modules_ol_render_canvas_Executor_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_Immediate_js.js +1208 -0
- package/vendors-node_modules_ol_render_canvas_Immediate_js.js.map +1 -0
- package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js +825 -0
- package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js.map +1 -0
- package/vendors-node_modules_ol_renderer_canvas_Layer_js.js +654 -0
- package/vendors-node_modules_ol_renderer_canvas_Layer_js.js.map +1 -0
- package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js +1044 -0
- package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js.map +1 -0
- package/vendors-node_modules_ol_renderer_vector_js.js +460 -0
- package/vendors-node_modules_ol_renderer_vector_js.js.map +1 -0
- package/vendors-node_modules_ol_source_Vector_js.js +2091 -0
- package/vendors-node_modules_ol_source_Vector_js.js.map +1 -0
- package/node_modules_ol_ImageTile_js.js +0 -177
- package/node_modules_ol_ImageTile_js.js.map +0 -1
- package/node_modules_ol_render_js.js +0 -131
- package/node_modules_ol_render_js.js.map +0 -1
- package/node_modules_ol_structs_LRUCache_js.js +0 -275
- package/node_modules_ol_structs_LRUCache_js.js.map +0 -1
- package/node_modules_ol_tilecoord_js.js +0 -115
- package/node_modules_ol_tilecoord_js.js.map +0 -1
- package/vendors-node_modules_ol_TileCache_js.js +0 -461
- package/vendors-node_modules_ol_TileCache_js.js.map +0 -1
- package/vendors-node_modules_ol_Tile_js.js +0 -330
- package/vendors-node_modules_ol_Tile_js.js.map +0 -1
- package/vendors-node_modules_ol_style_Text_js.js +0 -509
- package/vendors-node_modules_ol_style_Text_js.js.map +0 -1
- package/vendors-node_modules_rbush_index_js.js +0 -531
- package/vendors-node_modules_rbush_index_js.js.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_length_js-_375a1"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/length.js":
|
|
4
|
+
/*!*********************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/length.js ***!
|
|
6
|
+
\*********************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "lineStringLength": () => (/* binding */ lineStringLength),
|
|
12
|
+
/* harmony export */ "linearRingLength": () => (/* binding */ linearRingLength)
|
|
13
|
+
/* harmony export */ });
|
|
14
|
+
/**
|
|
15
|
+
* @module ol/geom/flat/length
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
20
|
+
* @param {number} offset Offset.
|
|
21
|
+
* @param {number} end End.
|
|
22
|
+
* @param {number} stride Stride.
|
|
23
|
+
* @return {number} Length.
|
|
24
|
+
*/
|
|
25
|
+
function lineStringLength(flatCoordinates, offset, end, stride) {
|
|
26
|
+
let x1 = flatCoordinates[offset];
|
|
27
|
+
let y1 = flatCoordinates[offset + 1];
|
|
28
|
+
let length = 0;
|
|
29
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
30
|
+
const x2 = flatCoordinates[i];
|
|
31
|
+
const y2 = flatCoordinates[i + 1];
|
|
32
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
33
|
+
x1 = x2;
|
|
34
|
+
y1 = y2;
|
|
35
|
+
}
|
|
36
|
+
return length;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
41
|
+
* @param {number} offset Offset.
|
|
42
|
+
* @param {number} end End.
|
|
43
|
+
* @param {number} stride Stride.
|
|
44
|
+
* @return {number} Perimeter.
|
|
45
|
+
*/
|
|
46
|
+
function linearRingLength(flatCoordinates, offset, end, stride) {
|
|
47
|
+
let perimeter = lineStringLength(flatCoordinates, offset, end, stride);
|
|
48
|
+
const dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
|
49
|
+
const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
|
|
50
|
+
perimeter += Math.sqrt(dx * dx + dy * dy);
|
|
51
|
+
return perimeter;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/***/ })
|
|
56
|
+
|
|
57
|
+
}])
|
|
58
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_length_js-_375a1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_length_js-_375a1.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/length.js"],"sourcesContent":["/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_length_js-_375a2"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/length.js":
|
|
4
|
+
/*!*********************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/length.js ***!
|
|
6
|
+
\*********************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "lineStringLength": () => (/* binding */ lineStringLength),
|
|
12
|
+
/* harmony export */ "linearRingLength": () => (/* binding */ linearRingLength)
|
|
13
|
+
/* harmony export */ });
|
|
14
|
+
/**
|
|
15
|
+
* @module ol/geom/flat/length
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
20
|
+
* @param {number} offset Offset.
|
|
21
|
+
* @param {number} end End.
|
|
22
|
+
* @param {number} stride Stride.
|
|
23
|
+
* @return {number} Length.
|
|
24
|
+
*/
|
|
25
|
+
function lineStringLength(flatCoordinates, offset, end, stride) {
|
|
26
|
+
let x1 = flatCoordinates[offset];
|
|
27
|
+
let y1 = flatCoordinates[offset + 1];
|
|
28
|
+
let length = 0;
|
|
29
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
30
|
+
const x2 = flatCoordinates[i];
|
|
31
|
+
const y2 = flatCoordinates[i + 1];
|
|
32
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
33
|
+
x1 = x2;
|
|
34
|
+
y1 = y2;
|
|
35
|
+
}
|
|
36
|
+
return length;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
41
|
+
* @param {number} offset Offset.
|
|
42
|
+
* @param {number} end End.
|
|
43
|
+
* @param {number} stride Stride.
|
|
44
|
+
* @return {number} Perimeter.
|
|
45
|
+
*/
|
|
46
|
+
function linearRingLength(flatCoordinates, offset, end, stride) {
|
|
47
|
+
let perimeter = lineStringLength(flatCoordinates, offset, end, stride);
|
|
48
|
+
const dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
|
49
|
+
const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
|
|
50
|
+
perimeter += Math.sqrt(dx * dx + dy * dy);
|
|
51
|
+
return perimeter;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/***/ })
|
|
56
|
+
|
|
57
|
+
}])
|
|
58
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_length_js-_375a2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_length_js-_375a2.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/length.js"],"sourcesContent":["/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_length_js-_375a3"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/length.js":
|
|
4
|
+
/*!*********************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/length.js ***!
|
|
6
|
+
\*********************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "lineStringLength": () => (/* binding */ lineStringLength),
|
|
12
|
+
/* harmony export */ "linearRingLength": () => (/* binding */ linearRingLength)
|
|
13
|
+
/* harmony export */ });
|
|
14
|
+
/**
|
|
15
|
+
* @module ol/geom/flat/length
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
20
|
+
* @param {number} offset Offset.
|
|
21
|
+
* @param {number} end End.
|
|
22
|
+
* @param {number} stride Stride.
|
|
23
|
+
* @return {number} Length.
|
|
24
|
+
*/
|
|
25
|
+
function lineStringLength(flatCoordinates, offset, end, stride) {
|
|
26
|
+
let x1 = flatCoordinates[offset];
|
|
27
|
+
let y1 = flatCoordinates[offset + 1];
|
|
28
|
+
let length = 0;
|
|
29
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
30
|
+
const x2 = flatCoordinates[i];
|
|
31
|
+
const y2 = flatCoordinates[i + 1];
|
|
32
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
33
|
+
x1 = x2;
|
|
34
|
+
y1 = y2;
|
|
35
|
+
}
|
|
36
|
+
return length;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
41
|
+
* @param {number} offset Offset.
|
|
42
|
+
* @param {number} end End.
|
|
43
|
+
* @param {number} stride Stride.
|
|
44
|
+
* @return {number} Perimeter.
|
|
45
|
+
*/
|
|
46
|
+
function linearRingLength(flatCoordinates, offset, end, stride) {
|
|
47
|
+
let perimeter = lineStringLength(flatCoordinates, offset, end, stride);
|
|
48
|
+
const dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
|
49
|
+
const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
|
|
50
|
+
perimeter += Math.sqrt(dx * dx + dy * dy);
|
|
51
|
+
return perimeter;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/***/ })
|
|
56
|
+
|
|
57
|
+
}])
|
|
58
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_length_js-_375a3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_length_js-_375a3.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/length.js"],"sourcesContent":["/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_length_js-_375a4"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/length.js":
|
|
4
|
+
/*!*********************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/length.js ***!
|
|
6
|
+
\*********************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "lineStringLength": () => (/* binding */ lineStringLength),
|
|
12
|
+
/* harmony export */ "linearRingLength": () => (/* binding */ linearRingLength)
|
|
13
|
+
/* harmony export */ });
|
|
14
|
+
/**
|
|
15
|
+
* @module ol/geom/flat/length
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
20
|
+
* @param {number} offset Offset.
|
|
21
|
+
* @param {number} end End.
|
|
22
|
+
* @param {number} stride Stride.
|
|
23
|
+
* @return {number} Length.
|
|
24
|
+
*/
|
|
25
|
+
function lineStringLength(flatCoordinates, offset, end, stride) {
|
|
26
|
+
let x1 = flatCoordinates[offset];
|
|
27
|
+
let y1 = flatCoordinates[offset + 1];
|
|
28
|
+
let length = 0;
|
|
29
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
30
|
+
const x2 = flatCoordinates[i];
|
|
31
|
+
const y2 = flatCoordinates[i + 1];
|
|
32
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
33
|
+
x1 = x2;
|
|
34
|
+
y1 = y2;
|
|
35
|
+
}
|
|
36
|
+
return length;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
41
|
+
* @param {number} offset Offset.
|
|
42
|
+
* @param {number} end End.
|
|
43
|
+
* @param {number} stride Stride.
|
|
44
|
+
* @return {number} Perimeter.
|
|
45
|
+
*/
|
|
46
|
+
function linearRingLength(flatCoordinates, offset, end, stride) {
|
|
47
|
+
let perimeter = lineStringLength(flatCoordinates, offset, end, stride);
|
|
48
|
+
const dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
|
49
|
+
const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
|
|
50
|
+
perimeter += Math.sqrt(dx * dx + dy * dy);
|
|
51
|
+
return perimeter;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/***/ })
|
|
56
|
+
|
|
57
|
+
}])
|
|
58
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_length_js-_375a4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_length_js-_375a4.js","mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/length.js"],"sourcesContent":["/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_linechunk_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/linechunk.js":
|
|
4
|
+
/*!************************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/linechunk.js ***!
|
|
6
|
+
\************************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "lineChunk": () => (/* binding */ lineChunk)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math.js */ "./node_modules/ol/math.js");
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Creates chunks of equal length from a linestring
|
|
18
|
+
* @param {number} chunkLength Length of each chunk.
|
|
19
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
20
|
+
* @param {number} offset Start offset of the `flatCoordinates`.
|
|
21
|
+
* @param {number} end End offset of the `flatCoordinates`.
|
|
22
|
+
* @param {number} stride Stride.
|
|
23
|
+
* @return {Array<Array<number>>} Chunks of linestrings with stride 2.
|
|
24
|
+
*/
|
|
25
|
+
function lineChunk(chunkLength, flatCoordinates, offset, end, stride) {
|
|
26
|
+
const chunks = [];
|
|
27
|
+
let cursor = offset;
|
|
28
|
+
let chunkM = 0;
|
|
29
|
+
let currentChunk = flatCoordinates.slice(offset, 2);
|
|
30
|
+
while (chunkM < chunkLength && cursor + stride < end) {
|
|
31
|
+
const [x1, y1] = currentChunk.slice(-2);
|
|
32
|
+
const x2 = flatCoordinates[cursor + stride];
|
|
33
|
+
const y2 = flatCoordinates[cursor + stride + 1];
|
|
34
|
+
const segmentLength = Math.sqrt(
|
|
35
|
+
(x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),
|
|
36
|
+
);
|
|
37
|
+
chunkM += segmentLength;
|
|
38
|
+
if (chunkM >= chunkLength) {
|
|
39
|
+
const m = (chunkLength - chunkM + segmentLength) / segmentLength;
|
|
40
|
+
const x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, m);
|
|
41
|
+
const y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, m);
|
|
42
|
+
currentChunk.push(x, y);
|
|
43
|
+
chunks.push(currentChunk);
|
|
44
|
+
currentChunk = [x, y];
|
|
45
|
+
if (chunkM == chunkLength) {
|
|
46
|
+
cursor += stride;
|
|
47
|
+
}
|
|
48
|
+
chunkM = 0;
|
|
49
|
+
} else if (chunkM < chunkLength) {
|
|
50
|
+
currentChunk.push(
|
|
51
|
+
flatCoordinates[cursor + stride],
|
|
52
|
+
flatCoordinates[cursor + stride + 1],
|
|
53
|
+
);
|
|
54
|
+
cursor += stride;
|
|
55
|
+
} else {
|
|
56
|
+
const missing = segmentLength - chunkM;
|
|
57
|
+
const x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, missing / segmentLength);
|
|
58
|
+
const y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, missing / segmentLength);
|
|
59
|
+
currentChunk.push(x, y);
|
|
60
|
+
chunks.push(currentChunk);
|
|
61
|
+
currentChunk = [x, y];
|
|
62
|
+
chunkM = 0;
|
|
63
|
+
cursor += stride;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (chunkM > 0) {
|
|
67
|
+
chunks.push(currentChunk);
|
|
68
|
+
}
|
|
69
|
+
return chunks;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/***/ })
|
|
74
|
+
|
|
75
|
+
}])
|
|
76
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_linechunk_js.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_linechunk_js.js","mappings":";;;;;;;;;;;;;AAAmC;;AAEnC;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,sBAAsB;AAClC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAI;AACpB,gBAAgB,8CAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,gBAAgB,8CAAI;AACpB,gBAAgB,8CAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/linechunk.js"],"sourcesContent":["import {lerp} from '../../math.js';\n\n/**\n * Creates chunks of equal length from a linestring\n * @param {number} chunkLength Length of each chunk.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @return {Array<Array<number>>} Chunks of linestrings with stride 2.\n */\nexport function lineChunk(chunkLength, flatCoordinates, offset, end, stride) {\n const chunks = [];\n let cursor = offset;\n let chunkM = 0;\n let currentChunk = flatCoordinates.slice(offset, 2);\n while (chunkM < chunkLength && cursor + stride < end) {\n const [x1, y1] = currentChunk.slice(-2);\n const x2 = flatCoordinates[cursor + stride];\n const y2 = flatCoordinates[cursor + stride + 1];\n const segmentLength = Math.sqrt(\n (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n );\n chunkM += segmentLength;\n if (chunkM >= chunkLength) {\n const m = (chunkLength - chunkM + segmentLength) / segmentLength;\n const x = lerp(x1, x2, m);\n const y = lerp(y1, y2, m);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n if (chunkM == chunkLength) {\n cursor += stride;\n }\n chunkM = 0;\n } else if (chunkM < chunkLength) {\n currentChunk.push(\n flatCoordinates[cursor + stride],\n flatCoordinates[cursor + stride + 1],\n );\n cursor += stride;\n } else {\n const missing = segmentLength - chunkM;\n const x = lerp(x1, x2, missing / segmentLength);\n const y = lerp(y1, y2, missing / segmentLength);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n chunkM = 0;\n cursor += stride;\n }\n }\n if (chunkM > 0) {\n chunks.push(currentChunk);\n }\n return chunks;\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_straightchunk_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/straightchunk.js":
|
|
4
|
+
/*!****************************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/straightchunk.js ***!
|
|
6
|
+
\****************************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "matchingChunk": () => (/* binding */ matchingChunk)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/**
|
|
14
|
+
* @module ol/geom/flat/straightchunk
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @param {number} maxAngle Maximum acceptable angle delta between segments.
|
|
19
|
+
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
20
|
+
* @param {number} offset Offset.
|
|
21
|
+
* @param {number} end End.
|
|
22
|
+
* @param {number} stride Stride.
|
|
23
|
+
* @return {Array<number>} Start and end of the first suitable chunk of the
|
|
24
|
+
* given `flatCoordinates`.
|
|
25
|
+
*/
|
|
26
|
+
function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {
|
|
27
|
+
let chunkStart = offset;
|
|
28
|
+
let chunkEnd = offset;
|
|
29
|
+
let chunkM = 0;
|
|
30
|
+
let m = 0;
|
|
31
|
+
let start = offset;
|
|
32
|
+
let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;
|
|
33
|
+
for (i = offset; i < end; i += stride) {
|
|
34
|
+
const x2 = flatCoordinates[i];
|
|
35
|
+
const y2 = flatCoordinates[i + 1];
|
|
36
|
+
if (x1 !== undefined) {
|
|
37
|
+
x23 = x2 - x1;
|
|
38
|
+
y23 = y2 - y1;
|
|
39
|
+
m23 = Math.sqrt(x23 * x23 + y23 * y23);
|
|
40
|
+
if (x12 !== undefined) {
|
|
41
|
+
m += m12;
|
|
42
|
+
acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));
|
|
43
|
+
if (acos > maxAngle) {
|
|
44
|
+
if (m > chunkM) {
|
|
45
|
+
chunkM = m;
|
|
46
|
+
chunkStart = start;
|
|
47
|
+
chunkEnd = i;
|
|
48
|
+
}
|
|
49
|
+
m = 0;
|
|
50
|
+
start = i - stride;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
m12 = m23;
|
|
54
|
+
x12 = x23;
|
|
55
|
+
y12 = y23;
|
|
56
|
+
}
|
|
57
|
+
x1 = x2;
|
|
58
|
+
y1 = y2;
|
|
59
|
+
}
|
|
60
|
+
m += m23;
|
|
61
|
+
return m > chunkM ? [start, i] : [chunkStart, chunkEnd];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/***/ })
|
|
66
|
+
|
|
67
|
+
}])
|
|
68
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_straightchunk_js.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_straightchunk_js.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,eAAe;AAC3B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/straightchunk.js"],"sourcesContent":["/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n let chunkStart = offset;\n let chunkEnd = offset;\n let chunkM = 0;\n let m = 0;\n let start = offset;\n let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n for (i = offset; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n if (x1 !== undefined) {\n x23 = x2 - x1;\n y23 = y2 - y1;\n m23 = Math.sqrt(x23 * x23 + y23 * y23);\n if (x12 !== undefined) {\n m += m12;\n acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n if (acos > maxAngle) {\n if (m > chunkM) {\n chunkM = m;\n chunkStart = start;\n chunkEnd = i;\n }\n m = 0;\n start = i - stride;\n }\n }\n m12 = m23;\n x12 = x23;\n y12 = y23;\n }\n x1 = x2;\n y1 = y2;\n }\n m += m23;\n return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["node_modules_ol_geom_flat_textpath_js"],{
|
|
2
|
+
|
|
3
|
+
/***/ "./node_modules/ol/geom/flat/textpath.js":
|
|
4
|
+
/*!***********************************************!*\
|
|
5
|
+
!*** ./node_modules/ol/geom/flat/textpath.js ***!
|
|
6
|
+
\***********************************************/
|
|
7
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
/* harmony export */ "drawTextOnPath": () => (/* binding */ drawTextOnPath)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../math.js */ "./node_modules/ol/math.js");
|
|
14
|
+
/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ "./node_modules/ol/geom/flat/transform.js");
|
|
15
|
+
/**
|
|
16
|
+
* @module ol/geom/flat/textpath
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {Array<number>} flatCoordinates Path to put text on.
|
|
23
|
+
* @param {number} offset Start offset of the `flatCoordinates`.
|
|
24
|
+
* @param {number} end End offset of the `flatCoordinates`.
|
|
25
|
+
* @param {number} stride Stride.
|
|
26
|
+
* @param {string} text Text to place on the path.
|
|
27
|
+
* @param {number} startM m along the path where the text starts.
|
|
28
|
+
* @param {number} maxAngle Max angle between adjacent chars in radians.
|
|
29
|
+
* @param {number} scale The product of the text scale and the device pixel ratio.
|
|
30
|
+
* @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.
|
|
31
|
+
* @param {string} font The font.
|
|
32
|
+
* @param {Object<string, number>} cache A cache of measured widths.
|
|
33
|
+
* @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.
|
|
34
|
+
* @param {boolean} keepUpright Whether the text needs to be kept upright
|
|
35
|
+
* @return {Array<Array<*>>|null} The result array (or null if `maxAngle` was
|
|
36
|
+
* exceeded). Entries of the array are x, y, anchorX, angle, chunk.
|
|
37
|
+
*/
|
|
38
|
+
function drawTextOnPath(
|
|
39
|
+
flatCoordinates,
|
|
40
|
+
offset,
|
|
41
|
+
end,
|
|
42
|
+
stride,
|
|
43
|
+
text,
|
|
44
|
+
startM,
|
|
45
|
+
maxAngle,
|
|
46
|
+
scale,
|
|
47
|
+
measureAndCacheTextWidth,
|
|
48
|
+
font,
|
|
49
|
+
cache,
|
|
50
|
+
rotation,
|
|
51
|
+
keepUpright = true,
|
|
52
|
+
) {
|
|
53
|
+
let x2 = flatCoordinates[offset];
|
|
54
|
+
let y2 = flatCoordinates[offset + 1];
|
|
55
|
+
let x1 = 0;
|
|
56
|
+
let y1 = 0;
|
|
57
|
+
let segmentLength = 0;
|
|
58
|
+
let segmentM = 0;
|
|
59
|
+
|
|
60
|
+
function advance() {
|
|
61
|
+
x1 = x2;
|
|
62
|
+
y1 = y2;
|
|
63
|
+
offset += stride;
|
|
64
|
+
x2 = flatCoordinates[offset];
|
|
65
|
+
y2 = flatCoordinates[offset + 1];
|
|
66
|
+
segmentM += segmentLength;
|
|
67
|
+
segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
68
|
+
}
|
|
69
|
+
do {
|
|
70
|
+
advance();
|
|
71
|
+
} while (offset < end - stride && segmentM + segmentLength < startM);
|
|
72
|
+
|
|
73
|
+
let interpolate =
|
|
74
|
+
segmentLength === 0 ? 0 : (startM - segmentM) / segmentLength;
|
|
75
|
+
const beginX = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, interpolate);
|
|
76
|
+
const beginY = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, interpolate);
|
|
77
|
+
|
|
78
|
+
const startOffset = offset - stride;
|
|
79
|
+
const startLength = segmentM;
|
|
80
|
+
const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);
|
|
81
|
+
while (offset < end - stride && segmentM + segmentLength < endM) {
|
|
82
|
+
advance();
|
|
83
|
+
}
|
|
84
|
+
interpolate = segmentLength === 0 ? 0 : (endM - segmentM) / segmentLength;
|
|
85
|
+
const endX = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, interpolate);
|
|
86
|
+
const endY = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, interpolate);
|
|
87
|
+
|
|
88
|
+
// Keep text upright if the option is selected
|
|
89
|
+
let reverse = false;
|
|
90
|
+
if (keepUpright) {
|
|
91
|
+
if (rotation) {
|
|
92
|
+
const flat = [beginX, beginY, endX, endY];
|
|
93
|
+
(0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.rotate)(flat, 0, 4, 2, rotation, flat, flat);
|
|
94
|
+
reverse = flat[0] > flat[2];
|
|
95
|
+
} else {
|
|
96
|
+
reverse = beginX > endX;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const PI = Math.PI;
|
|
101
|
+
const result = [];
|
|
102
|
+
const singleSegment = startOffset + stride === offset;
|
|
103
|
+
|
|
104
|
+
offset = startOffset;
|
|
105
|
+
segmentLength = 0;
|
|
106
|
+
segmentM = startLength;
|
|
107
|
+
x2 = flatCoordinates[offset];
|
|
108
|
+
y2 = flatCoordinates[offset + 1];
|
|
109
|
+
|
|
110
|
+
let previousAngle;
|
|
111
|
+
// All on the same segment
|
|
112
|
+
if (singleSegment) {
|
|
113
|
+
advance();
|
|
114
|
+
|
|
115
|
+
previousAngle = Math.atan2(y2 - y1, x2 - x1);
|
|
116
|
+
if (reverse) {
|
|
117
|
+
previousAngle += previousAngle > 0 ? -PI : PI;
|
|
118
|
+
}
|
|
119
|
+
const x = (endX + beginX) / 2;
|
|
120
|
+
const y = (endY + beginY) / 2;
|
|
121
|
+
result[0] = [x, y, (endM - startM) / 2, previousAngle, text];
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// rendering across line segments
|
|
126
|
+
text = text.replace(/\n/g, ' '); // ensure rendering in single-line as all calculations below don't handle multi-lines
|
|
127
|
+
|
|
128
|
+
for (let i = 0, ii = text.length; i < ii; ) {
|
|
129
|
+
advance();
|
|
130
|
+
let angle = Math.atan2(y2 - y1, x2 - x1);
|
|
131
|
+
if (reverse) {
|
|
132
|
+
angle += angle > 0 ? -PI : PI;
|
|
133
|
+
}
|
|
134
|
+
if (previousAngle !== undefined) {
|
|
135
|
+
let delta = angle - previousAngle;
|
|
136
|
+
delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;
|
|
137
|
+
if (Math.abs(delta) > maxAngle) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
previousAngle = angle;
|
|
142
|
+
|
|
143
|
+
const iStart = i;
|
|
144
|
+
let charLength = 0;
|
|
145
|
+
for (; i < ii; ++i) {
|
|
146
|
+
const index = reverse ? ii - i - 1 : i;
|
|
147
|
+
const len = scale * measureAndCacheTextWidth(font, text[index], cache);
|
|
148
|
+
if (
|
|
149
|
+
offset + stride < end &&
|
|
150
|
+
segmentM + segmentLength < startM + charLength + len / 2
|
|
151
|
+
) {
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
charLength += len;
|
|
155
|
+
}
|
|
156
|
+
if (i === iStart) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
const chars = reverse
|
|
160
|
+
? text.substring(ii - iStart, ii - i)
|
|
161
|
+
: text.substring(iStart, i);
|
|
162
|
+
interpolate =
|
|
163
|
+
segmentLength === 0
|
|
164
|
+
? 0
|
|
165
|
+
: (startM + charLength / 2 - segmentM) / segmentLength;
|
|
166
|
+
const x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(x1, x2, interpolate);
|
|
167
|
+
const y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(y1, y2, interpolate);
|
|
168
|
+
result.push([x, y, charLength / 2, angle, chars]);
|
|
169
|
+
startM += charLength;
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/***/ })
|
|
176
|
+
|
|
177
|
+
}])
|
|
178
|
+
//# sourceMappingURL=node_modules_ol_geom_flat_textpath_js.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node_modules_ol_geom_flat_textpath_js.js","mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACmC;AACG;;AAEtC;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,yDAAyD;AACpE,WAAW,QAAQ;AACnB,WAAW,wBAAwB;AACnC,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,YAAY,sBAAsB;AAClC;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,iBAAiB,8CAAI;AACrB,iBAAiB,8CAAI;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAAI;AACnB,eAAe,8CAAI;;AAEnB;AACA;AACA;AACA;AACA;AACA,MAAM,qDAAM;AACZ;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC;;AAEnC,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,8CAAI;AAClB,cAAc,8CAAI;AAClB;AACA;AACA;AACA;AACA","sources":["webpack://@vaadin/bundles/./node_modules/ol/geom/flat/textpath.js"],"sourcesContent":["/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\nimport {rotate} from './transform.js';\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @param {boolean} keepUpright Whether the text needs to be kept upright\n * @return {Array<Array<*>>|null} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n flatCoordinates,\n offset,\n end,\n stride,\n text,\n startM,\n maxAngle,\n scale,\n measureAndCacheTextWidth,\n font,\n cache,\n rotation,\n keepUpright = true,\n) {\n let x2 = flatCoordinates[offset];\n let y2 = flatCoordinates[offset + 1];\n let x1 = 0;\n let y1 = 0;\n let segmentLength = 0;\n let segmentM = 0;\n\n function advance() {\n x1 = x2;\n y1 = y2;\n offset += stride;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n segmentM += segmentLength;\n segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n do {\n advance();\n } while (offset < end - stride && segmentM + segmentLength < startM);\n\n let interpolate =\n segmentLength === 0 ? 0 : (startM - segmentM) / segmentLength;\n const beginX = lerp(x1, x2, interpolate);\n const beginY = lerp(y1, y2, interpolate);\n\n const startOffset = offset - stride;\n const startLength = segmentM;\n const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n while (offset < end - stride && segmentM + segmentLength < endM) {\n advance();\n }\n interpolate = segmentLength === 0 ? 0 : (endM - segmentM) / segmentLength;\n const endX = lerp(x1, x2, interpolate);\n const endY = lerp(y1, y2, interpolate);\n\n // Keep text upright if the option is selected\n let reverse = false;\n if (keepUpright) {\n if (rotation) {\n const flat = [beginX, beginY, endX, endY];\n rotate(flat, 0, 4, 2, rotation, flat, flat);\n reverse = flat[0] > flat[2];\n } else {\n reverse = beginX > endX;\n }\n }\n\n const PI = Math.PI;\n const result = [];\n const singleSegment = startOffset + stride === offset;\n\n offset = startOffset;\n segmentLength = 0;\n segmentM = startLength;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n\n let previousAngle;\n // All on the same segment\n if (singleSegment) {\n advance();\n\n previousAngle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n previousAngle += previousAngle > 0 ? -PI : PI;\n }\n const x = (endX + beginX) / 2;\n const y = (endY + beginY) / 2;\n result[0] = [x, y, (endM - startM) / 2, previousAngle, text];\n return result;\n }\n\n // rendering across line segments\n text = text.replace(/\\n/g, ' '); // ensure rendering in single-line as all calculations below don't handle multi-lines\n\n for (let i = 0, ii = text.length; i < ii; ) {\n advance();\n let angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -PI : PI;\n }\n if (previousAngle !== undefined) {\n let delta = angle - previousAngle;\n delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n previousAngle = angle;\n\n const iStart = i;\n let charLength = 0;\n for (; i < ii; ++i) {\n const index = reverse ? ii - i - 1 : i;\n const len = scale * measureAndCacheTextWidth(font, text[index], cache);\n if (\n offset + stride < end &&\n segmentM + segmentLength < startM + charLength + len / 2\n ) {\n break;\n }\n charLength += len;\n }\n if (i === iStart) {\n continue;\n }\n const chars = reverse\n ? text.substring(ii - iStart, ii - i)\n : text.substring(iStart, i);\n interpolate =\n segmentLength === 0\n ? 0\n : (startM + charLength / 2 - segmentM) / segmentLength;\n const x = lerp(x1, x2, interpolate);\n const y = lerp(y1, y2, interpolate);\n result.push([x, y, charLength / 2, angle, chars]);\n startM += charLength;\n }\n return result;\n}\n"],"names":[],"sourceRoot":""}
|