@2gis/mapgl-gltf
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -110,3 +110,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
yield this.waitForPluginInit; | ||
const loadedModels = this.startModelLoading(modelOptions); | ||
const loadedModels = this.startModelLoading(modelOptions, ids); | ||
return Promise.all(loadedModels).then(() => { | ||
@@ -264,11 +264,13 @@ if (this.options.modelsLoadStrategy === 'waitAll') { | ||
} | ||
startModelLoading(modelOptions) { | ||
startModelLoading(modelOptions, ids) { | ||
return modelOptions.map((options) => { | ||
return this.loader.loadModel(options).then(() => { | ||
if (this.options.modelsLoadStrategy === 'dontWaitAll') { | ||
if (options.linkedIds) { | ||
this.map.setHiddenObjects(options.linkedIds); | ||
if (ids === undefined || ids.includes(options.modelId)) { | ||
if (options.linkedIds) { | ||
this.map.setHiddenObjects(options.linkedIds); | ||
} | ||
this.addModelFromCache(options.modelId); | ||
this.map.triggerRerender(); | ||
} | ||
this.addModelFromCache(options.modelId); | ||
this.map.triggerRerender(); | ||
} | ||
@@ -275,0 +277,0 @@ }); |
{ | ||
"name": "@2gis/mapgl-gltf", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Plugin for the rendering glTF models with MapGL", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
4136578
3211