septima-widget 3.20.0 → 3.21.0
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/package.json +1 -1
- package/widgetapi.mjs +8 -8
package/package.json
CHANGED
package/widgetapi.mjs
CHANGED
|
@@ -6,7 +6,7 @@ export default class WidgetAPI {
|
|
|
6
6
|
|
|
7
7
|
_target = null
|
|
8
8
|
|
|
9
|
-
VERSION = '3.
|
|
9
|
+
VERSION = '3.21.0'
|
|
10
10
|
|
|
11
11
|
isReady = false
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ export default class WidgetAPI {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async _load(target, config, options) {
|
|
19
|
-
const { load } = await import('https://widget.cdn.septima.dk/3.
|
|
19
|
+
const { load } = await import('https://widget.cdn.septima.dk/3.21.0/core/load.mjs')
|
|
20
20
|
this._widget = await load(target, config, options, this)
|
|
21
21
|
this.on('controlsready', () => {
|
|
22
22
|
this._controlsReady()
|
|
@@ -86,7 +86,7 @@ export default class WidgetAPI {
|
|
|
86
86
|
getURLParam(name) {
|
|
87
87
|
return (
|
|
88
88
|
decodeURIComponent(
|
|
89
|
-
(new RegExp(
|
|
89
|
+
(new RegExp(`[?|&]${name}=([^&;]+?)(&|#|;|$)`).exec(location.search) || [
|
|
90
90
|
undefined,
|
|
91
91
|
''
|
|
92
92
|
])[1].replace(/\+/g, '%20')
|
|
@@ -94,10 +94,10 @@ export default class WidgetAPI {
|
|
|
94
94
|
)
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
bind(func, object) {
|
|
98
|
-
var args =
|
|
99
|
-
return
|
|
100
|
-
var newArgs = args.concat(
|
|
97
|
+
bind(func, object, ...extraArgs) {
|
|
98
|
+
var args = extraArgs
|
|
99
|
+
return (...callArgs) => {
|
|
100
|
+
var newArgs = args.concat(callArgs)
|
|
101
101
|
return func.apply(object, newArgs)
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -236,7 +236,7 @@ export default class WidgetAPI {
|
|
|
236
236
|
|
|
237
237
|
transform(geojson, options, callback) {
|
|
238
238
|
this._controlsReady(async () => {
|
|
239
|
-
const { transform } = await import('https://widget.cdn.septima.dk/3.
|
|
239
|
+
const { transform } = await import('https://widget.cdn.septima.dk/3.21.0/core/load.mjs')
|
|
240
240
|
if (callback) {
|
|
241
241
|
callback(transform(geojson, options))
|
|
242
242
|
} else {
|