浏览代码

fix deflate progress

Sukolsak Sakshuwong 4 年之前
父节点
当前提交
d0705ac226
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/mol-util/zip/deflate.ts

+ 1 - 1
src/mol-util/zip/deflate.ts

@@ -139,7 +139,7 @@ export async function _deflateRaw(runtime: RuntimeContext, data: Uint8Array, out
 
     while (ctx.i < dlen) {
         if (runtime.shouldUpdate) {
-            await runtime.update({ message: 'Deflating...', current: ctx.pos, max: data.length });
+            await runtime.update({ message: 'Deflating...', current: ctx.i, max: dlen });
         }
         deflateChunk(ctx, 1024 * 1024);
     }