@masterportal/masterportalapi 2.50.0 → 2.51.1
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/CHANGELOG.md
CHANGED
|
@@ -3,18 +3,29 @@
|
|
|
3
3
|
|
|
4
4
|
The [Semantic Versioning](https://semver.org/spec/v2.0.0.html) is used.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
### __Breaking Changes__
|
|
8
|
-
|
|
9
|
-
### Added
|
|
6
|
+
## 2.51.1 (LTS) - 2026-06-12
|
|
10
7
|
|
|
11
|
-
###
|
|
8
|
+
### Fixed
|
|
9
|
+
- VectorStyle: Fixed styling of polygons: `"zig-line-horizontal"` and `"diagonal-right"` are rotated by 90°.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## 2.51.0 - 2025-09-18
|
|
14
12
|
|
|
15
|
-
###
|
|
13
|
+
### __Breaking Changes__
|
|
14
|
+
- Dropped support for **Node.js 18.x**, **20.x** and **npm 9**. Minimum required is now **Node.js 22.19.0 (LTS)** with **npm 10.x**.
|
|
16
15
|
|
|
17
|
-
###
|
|
16
|
+
### Changed
|
|
17
|
+
- cesium/engine updated to current Version 20.0.1
|
|
18
|
+
- The following packages have been updated:
|
|
19
|
+
- devDependencies:
|
|
20
|
+
- @parcel: ^2.13.0 to ^2.15.4
|
|
21
|
+
- @swc/jest: ^0.2.29 to ^0.2.39
|
|
22
|
+
- canvas: ^2.11.2 to ^3.1.2
|
|
23
|
+
- jest: ^29.7.0 to ^30.0.5
|
|
24
|
+
- jest-environment-jsdom: ^29.7.0 to ^30.0.5
|
|
25
|
+
- transformer-sass: ^2.13.0 to ^2.15.4
|
|
26
|
+
- the following package has been added:
|
|
27
|
+
- devDependencies:
|
|
28
|
+
- @parcel/config-default": "^2.15.4"
|
|
18
29
|
|
|
19
30
|
---
|
|
20
31
|
|
package/bitbucket-pipelines.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,74 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@masterportal/masterportalapi",
|
|
3
|
-
"author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
|
|
4
|
-
"version": "2.
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"description": "Basic functions of the Masterportal as api",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git"
|
|
10
|
-
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"jest
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@masterportal/masterportalapi",
|
|
3
|
+
"author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
|
|
4
|
+
"version": "2.51.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "Basic functions of the Masterportal as api",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git"
|
|
10
|
+
},
|
|
11
|
+
"source": "src/index.js",
|
|
12
|
+
"main": "src/index.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"targets": {
|
|
17
|
+
"library": {
|
|
18
|
+
"source": "src/index.js",
|
|
19
|
+
"distDir": "dist",
|
|
20
|
+
"outputFormat": "commonjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "jest .test.js --config ./jest.config.js --collectCoverage",
|
|
25
|
+
"test:trace": "node --trace-warnings node_modules/jest/bin/jest.js .test.js --config ./jest.config.js",
|
|
26
|
+
"test:watch": "jest .test.js --config ./jest.config.js --watch",
|
|
27
|
+
"example": "parcel example/index.html",
|
|
28
|
+
"generate-jsdoc": "jsdoc ./src -r -d ./docs/ -R ./README.md -c jsdoc.json",
|
|
29
|
+
"prePushHook": "eslint --max-warnings 0 \"./**/*.js\" && npm run test",
|
|
30
|
+
"prepare": "husky install"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"core-js": "^3.33.1",
|
|
34
|
+
"dayjs": "^1.11.10",
|
|
35
|
+
"ol": "^10.6.0",
|
|
36
|
+
"ol-mapbox-style": "12.5.0",
|
|
37
|
+
"olcs": "^2.22.1",
|
|
38
|
+
"proj4": "^2.10.0",
|
|
39
|
+
"xml2js": "^0.6.2"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/core": "7.26.0",
|
|
43
|
+
"@babel/plugin-transform-modules-commonjs": "^7.23.0",
|
|
44
|
+
"@parcel/config-default": "^2.15.4",
|
|
45
|
+
"@parcel/transformer-sass": "^2.15.4",
|
|
46
|
+
"@swc/jest": "^0.2.39",
|
|
47
|
+
"assert": "^2.1.0",
|
|
48
|
+
"browserify-zlib": "^0.2.0",
|
|
49
|
+
"buffer": "^6.0.3",
|
|
50
|
+
"canvas": "3.2.0",
|
|
51
|
+
"eslint": "8.57.1",
|
|
52
|
+
"events": "^3.3.0",
|
|
53
|
+
"https-browserify": "^1.0.0",
|
|
54
|
+
"husky": "8.0.3",
|
|
55
|
+
"jest": "30.1.3",
|
|
56
|
+
"jest-canvas-mock": "2.5.2",
|
|
57
|
+
"jest-environment-jsdom": "30.1.2",
|
|
58
|
+
"jest-fetch-mock": "^3.0.3",
|
|
59
|
+
"jsdoc": "4.0.2",
|
|
60
|
+
"parcel": "^2.15.4",
|
|
61
|
+
"process": "^0.11.10",
|
|
62
|
+
"sass": "1.69.4",
|
|
63
|
+
"stream-browserify": "^3.0.0",
|
|
64
|
+
"stream-http": "^3.2.0",
|
|
65
|
+
"timers-browserify": "^2.0.12",
|
|
66
|
+
"url": "^0.11.3",
|
|
67
|
+
"use-resize-observer": "^9.1.0",
|
|
68
|
+
"util": "^0.12.5"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"@cesium/engine": "^20.0.1"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": "^22.19.0",
|
|
75
|
+
"npm": "^10.5.0"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
|
|
78
|
+
"directories": {
|
|
79
|
+
"doc": "docs",
|
|
80
|
+
"example": "example",
|
|
81
|
+
"test": "test"
|
|
82
|
+
},
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/issues"
|
|
85
|
+
}
|
|
86
|
+
}
|
package/publiccode.yml
CHANGED
|
@@ -81,8 +81,8 @@ maintenance:
|
|
|
81
81
|
name: Masterportal
|
|
82
82
|
platforms:
|
|
83
83
|
- web
|
|
84
|
-
releaseDate: '
|
|
84
|
+
releaseDate: '2026-06-12'
|
|
85
85
|
roadmap: 'https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/src/master/'
|
|
86
86
|
softwareType: api
|
|
87
|
-
softwareVersion: 2.
|
|
87
|
+
softwareVersion: 2.51.1 (LTS)
|
|
88
88
|
url: 'https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git'
|
package/src/renderer/webgl.js
CHANGED
|
@@ -40,7 +40,14 @@ const defaultPointStyle = [
|
|
|
40
40
|
opacity: 1
|
|
41
41
|
},
|
|
42
42
|
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @typedef {Object} LiteralStyle
|
|
45
|
+
* @property {string} [stroke-color]
|
|
46
|
+
* @property {number} [stroke-width]
|
|
47
|
+
* @property {string} [fill-color]
|
|
48
|
+
* @property {number} [opacity]
|
|
49
|
+
* @property {number} [size]
|
|
50
|
+
*/
|
|
44
51
|
style = Object.assign({
|
|
45
52
|
"stroke-color": ["get", "strokeColor"],
|
|
46
53
|
"stroke-width": ["get", "strokeWidth", "number"],
|
|
@@ -127,7 +127,7 @@ function rotateContextCenter (context, size, degrees = 90) {
|
|
|
127
127
|
const halfSize = 0.5 * size;
|
|
128
128
|
|
|
129
129
|
context.translate(halfSize, halfSize);
|
|
130
|
-
context.rotate(degrees *
|
|
130
|
+
context.rotate(degrees * Math.PI / 180);
|
|
131
131
|
context.translate(-halfSize, -halfSize);
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -146,13 +146,12 @@ export function drawHatch (context, size, pattern) {
|
|
|
146
146
|
if (hatchDefinition) {
|
|
147
147
|
const {draw, rotate} = hatchDefinition;
|
|
148
148
|
|
|
149
|
-
if (draw) {
|
|
150
|
-
draw.forEach(segment => drawSegment(context, size, segment));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
149
|
if (rotate) {
|
|
154
150
|
rotateContextCenter(context, size, rotate);
|
|
155
151
|
}
|
|
152
|
+
if (draw) {
|
|
153
|
+
draw.forEach(segment => drawSegment(context, size, segment));
|
|
154
|
+
}
|
|
156
155
|
}
|
|
157
156
|
else {
|
|
158
157
|
console.error(`polygonStyleHatches: Unknown polygon style "${pattern}". Skipping hatching.`);
|
|
@@ -34,11 +34,12 @@ describe("setBackgroundImage.js", function () {
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
it("preserves empty string as input to set explicitly no background image", function () {
|
|
37
|
-
const backgroundImage = ""
|
|
37
|
+
const backgroundImage = "",
|
|
38
|
+
got = document.getElementById("map").style.backgroundImage;
|
|
38
39
|
|
|
39
40
|
setBackgroundImage({backgroundImage});
|
|
40
41
|
|
|
41
|
-
expect(
|
|
42
|
+
expect(["", "url()", "url(\"\")"]).toContain(got);
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
it("sets the default background image if none was given", function () {
|