Merge pull request #1087 from openreplay/player-fix

fix(player): fix initial visual offset jump
This commit is contained in:
Mehdi Osman 2023-03-31 16:39:19 +02:00 committed by GitHub
commit 1aa0fe682a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -470,7 +470,10 @@ export default class MessageManager {
default:
switch (msg.tp) {
case MType.CreateDocument:
if (!this.firstVisualEventSet) this.state.update({ firstVisualEvent: msg.time });
if (!this.firstVisualEventSet) {
this.state.update({ firstVisualEvent: msg.time });
this.firstVisualEventSet = true;
}
this.windowNodeCounter.reset();
this.performanceTrackManager.setCurrentNodesCount(this.windowNodeCounter.count);
break;