Skip to content

Commit

Permalink
fix loading
Browse files Browse the repository at this point in the history
  • Loading branch information
SuQiang2007 committed Nov 27, 2023
1 parent 30b965d commit 2cc67d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/client/dist/assets/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,10 @@ System.register("chunks:///_virtual/loading.ts", ['./rollupPluginModLoBabelHelpe
this.progressBar.progress = 0;
}

ponzi_controller.instance.on(ccc_msg.update_loading_percentage, this.setProgress.bind(this));
var self = this;
ponzi_controller.instance.on(ccc_msg.update_loading_percentage, function (percent) {
self.setProgress(percent);
});
} // 外界传入百分比,并更新进度条
;

Expand Down Expand Up @@ -6289,7 +6292,7 @@ System.register("chunks:///_virtual/ponzi-controller.ts", ['./rollupPluginModLoB
};

_proto.onSyncProgressUpdate = function onSyncProgressUpdate(values) {
console.error("onSyncProgressUpdate:", values);
console.log("onSyncProgressUpdate:", values);
var percentage = values.percentage;
ponzi_controller.instance.sendCCCMsg(ccc_msg.update_loading_percentage, percentage); // if(percentage >= 1){
// }
Expand Down
2 changes: 1 addition & 1 deletion packages/client/dist/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ components.GameState.update$.subscribe((update) => {
// Update initial sync status in the UI
components.SyncProgress.update$.subscribe((obj) => {
console.log("onSyncProgressUpdate:",obj);
globalThis.ponzi.percentage = obj.value[0].percentage/100;
globalThis.ponzi.percentage = obj.value[0].percentage;
globalThis.ponzi.syncprogress_update?.(globalThis.ponzi.percentage);
});

Expand Down

0 comments on commit 2cc67d0

Please sign in to comment.