@abi-software/flatmap-viewer 2.3.0-a.3 → 2.3.0-a.4
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/README.rst +1 -1
- package/package.json +1 -1
- package/src/annotation.js +15 -10
package/README.rst
CHANGED
|
@@ -38,7 +38,7 @@ The map server endpoint is specified as ``MAP_ENDPOINT`` in ``src/main.js``. It
|
|
|
38
38
|
Package Installation
|
|
39
39
|
====================
|
|
40
40
|
|
|
41
|
-
* ``npm install @abi-software/flatmap-viewer@2.3.0-a.
|
|
41
|
+
* ``npm install @abi-software/flatmap-viewer@2.3.0-a.4``
|
|
42
42
|
|
|
43
43
|
Documentation
|
|
44
44
|
-------------
|
package/package.json
CHANGED
package/src/annotation.js
CHANGED
|
@@ -113,17 +113,18 @@ export class Annotator
|
|
|
113
113
|
}).then((response) => {
|
|
114
114
|
panel.headerlogo.innerHTML = '';
|
|
115
115
|
if (response.ok) {
|
|
116
|
-
|
|
117
|
-
if ('error' in creator) {
|
|
118
|
-
callback({error: creator.error});
|
|
119
|
-
} else {
|
|
120
|
-
this.__setUser(creator);
|
|
121
|
-
this.__authorised = true;
|
|
122
|
-
callback(creator);
|
|
123
|
-
}
|
|
116
|
+
return response.json();
|
|
124
117
|
} else {
|
|
125
118
|
callback({error: `${response.status} ${response.statusText}`});
|
|
126
119
|
}
|
|
120
|
+
}).then((response) => {
|
|
121
|
+
if ('error' in response) {
|
|
122
|
+
callback({error: response.error});
|
|
123
|
+
} else {
|
|
124
|
+
this.__setUser(response);
|
|
125
|
+
this.__authorised = true;
|
|
126
|
+
callback(response);
|
|
127
|
+
}
|
|
127
128
|
});
|
|
128
129
|
setTimeout((panel) => {
|
|
129
130
|
if (this.user === 'undefined') {
|
|
@@ -148,10 +149,12 @@ export class Annotator
|
|
|
148
149
|
}).then((response) => {
|
|
149
150
|
if (response.ok) {
|
|
150
151
|
this.__authorised = false;
|
|
151
|
-
|
|
152
|
+
return response.json();
|
|
152
153
|
} else {
|
|
153
154
|
console.log('Annotator logout:', `${response.status} ${response.statusText}`);
|
|
154
155
|
}
|
|
156
|
+
}).then((response) => {
|
|
157
|
+
console.log('Annotator logout:', response);
|
|
155
158
|
});
|
|
156
159
|
setTimeout(() => {
|
|
157
160
|
if (this.__authorised) {
|
|
@@ -293,10 +296,12 @@ export class Annotator
|
|
|
293
296
|
signal: abortController.signal
|
|
294
297
|
}).then((response) => {
|
|
295
298
|
if (response.ok) {
|
|
296
|
-
|
|
299
|
+
return response.json();
|
|
297
300
|
} else {
|
|
298
301
|
callback({error: `${response.status} ${response.statusText}`});
|
|
299
302
|
}
|
|
303
|
+
}).then((response) => {
|
|
304
|
+
callback(response);
|
|
300
305
|
});
|
|
301
306
|
return abortController;
|
|
302
307
|
}
|