@preference-sl/pref-viewer 2.11.0-beta.2 → 2.11.0-beta.20
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 +61 -49
- package/src/babylonjs-animation-controller.js +217 -0
- package/src/babylonjs-animation-opening-menu.js +395 -0
- package/src/babylonjs-animation-opening.js +527 -0
- package/src/babylonjs-controller.js +481 -98
- package/src/file-storage.js +11 -2
- package/src/index.js +18 -772
- package/src/panzoom-controller.js +92 -54
- package/src/pref-viewer-2d.js +25 -12
- package/src/pref-viewer-3d-data.js +3 -2
- package/src/pref-viewer-3d.js +93 -21
- package/src/pref-viewer-dialog.js +146 -0
- package/src/pref-viewer-task.js +1 -1
- package/src/pref-viewer.js +934 -0
- package/src/styles.js +334 -0
- package/src/svg-resolver.js +23 -0
package/src/file-storage.js
CHANGED
|
@@ -174,7 +174,12 @@ export class FileStorage {
|
|
|
174
174
|
xhr.onload = () => {
|
|
175
175
|
if (xhr.status === 200) {
|
|
176
176
|
const blob = xhr.response;
|
|
177
|
-
const
|
|
177
|
+
const lastModified = xhr.getResponseHeader("Last-Modified");
|
|
178
|
+
let timeStamp = null;
|
|
179
|
+
if (lastModified) {
|
|
180
|
+
const parsed = new Date(lastModified);
|
|
181
|
+
timeStamp = Number.isNaN(parsed.valueOf()) ? null : parsed.toISOString();
|
|
182
|
+
}
|
|
178
183
|
file = { blob: blob, timeStamp: timeStamp };
|
|
179
184
|
resolve(file);
|
|
180
185
|
} else {
|
|
@@ -204,7 +209,11 @@ export class FileStorage {
|
|
|
204
209
|
xhr.responseType = "blob";
|
|
205
210
|
xhr.onload = () => {
|
|
206
211
|
if (xhr.status === 200) {
|
|
207
|
-
|
|
212
|
+
const lastModified = xhr.getResponseHeader("Last-Modified");
|
|
213
|
+
if (lastModified) {
|
|
214
|
+
const parsed = new Date(lastModified);
|
|
215
|
+
timeStamp = Number.isNaN(parsed.valueOf()) ? null : parsed.toISOString();
|
|
216
|
+
}
|
|
208
217
|
resolve(timeStamp);
|
|
209
218
|
} else {
|
|
210
219
|
resolve(timeStamp);
|