未验证 提交 aebb70c3 编写于 作者: K Kirill Lakhov 提交者: GitHub

Fixed bug: task creation progressbar (#13)

fixed rounding in callbacks
上级 26d49abd
......@@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TDB
### Fixed
- TDB
- Task creation progressbar bug (<https://github.com/cvat-ai/cvat/issues/12>)
### Security
- TDB
......
{
"name": "cvat-core",
"version": "5.0.1",
"version": "5.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cvat-core",
"version": "5.0.1",
"version": "5.0.2",
"license": "MIT",
"dependencies": {
"axios": "^0.21.4",
......
{
"name": "cvat-core",
"version": "5.0.1",
"version": "5.0.2",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "babel.config.js",
"scripts": {
......
......@@ -75,7 +75,7 @@
onProgress(bytesUploaded) {
if (onUpdate && Number.isInteger(totalSentSize) && Number.isInteger(totalSize)) {
const currentUploadedSize = totalSentSize + bytesUploaded;
const percentage = Math.round(currentUploadedSize / totalSize);
const percentage = currentUploadedSize / totalSize;
onUpdate(percentage);
}
},
......
{
"name": "cvat-ui",
"version": "1.37.0",
"version": "1.37.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cvat-ui",
"version": "1.37.0",
"version": "1.37.1",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^4.6.3",
......
{
"name": "cvat-ui",
"version": "1.37.0",
"version": "1.37.1",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
......
......@@ -44,7 +44,7 @@ export const importDatasetAsync = (instance: any, format: string, file: File): T
}
dispatch(importActions.importDataset(instance.id));
await instance.annotations.importDataset(format, file, (message: string, progress: number) => (
dispatch(importActions.importDatasetUpdateStatus(progress * 100, message))
dispatch(importActions.importDatasetUpdateStatus(Math.floor(progress * 100), message))
));
} catch (error) {
dispatch(importActions.importDatasetFailed(instance, error));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册