Merge pull request #700 from ProjectBarks/master

[cesium-ion] Add Texture localization + Fix delete refresh bug
pull/702/head
Piero Toffanin 2019-07-15 16:16:34 -04:00 zatwierdzone przez GitHub
commit 172ad0f62e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 17 dodań i 5 usunięć

Wyświetl plik

@ -244,6 +244,19 @@ class ShareTaskView(TaskView):
# Skip already processing tasks
if asset_type not in get_processing_assets(task.id):
if asset_type == AssetType.TEXTURED_MODEL and "position" not in options:
extent = None
if task.dsm_extent is not None:
extent = task.dsm_extent.extent
if task.dtm_extent is not None:
extent = task.dtm_extent.extent
if extent is None:
print(f"Unable to find task boundary: {task}")
else:
lng, lat = extent[0], extent[1]
# height is set to zero as model is already offset
options["position"] = [lng, lat, 0]
del_asset_info(task.id, asset_type)
asset_info = get_asset_info(task.id, asset_type)
asset_info["upload"]["active"] = True

Wyświetl plik

@ -2,7 +2,7 @@
"name": "Cesium ion",
"webodmMinVersion": "0.6.0",
"description": "Upload and tile ODM assets with Cesium ion.",
"version": "1.0.0",
"version": "1.2.0",
"author": "Cesium GS, Inc",
"email": "hello@cesium.com",
"repository": "",

Wyświetl plik

@ -94,7 +94,7 @@ export default class TaskView extends Component {
}
};
onCleanStatus = ({ data: { updated = false } }) => {
onCleanStatus = ({ updated = false }) => {
if (!updated || this.refreshAssets == null) return;
this.refreshAssets();
};

Wyświetl plik

@ -52,14 +52,13 @@ export class Fetcher extends PureComponent {
.then(data => {
this.setState({ data, isLoading: false });
onLoad(data);
this.cancelableFetch = null;
})
.catch(out => {
if (out.isCanceled) return;
this.setState({ error: out, isLoading: false, isError: true });
onError(out);
this.cancelableFetch = null;
});
})
.finally(() => (this.cancelableFetch = null));
};
componentDidMount() {