Skip to content

Commit

Permalink
Merge pull request #1163 from cogentcore/goupdt
Browse files Browse the repository at this point in the history
move web time.sleep to base GoUpdatePlot -- always needed.
  • Loading branch information
kkoreilly authored Aug 20, 2024
2 parents 4969829 + 4823ac4 commit 2fe38ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plot/plotcore/ploteditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"path/filepath"
"reflect"
"strings"
"time"

"cogentcore.org/core/base/errors"
"cogentcore.org/core/base/iox/imagex"
Expand All @@ -25,6 +26,7 @@ import (
"cogentcore.org/core/plot"
"cogentcore.org/core/styles"
"cogentcore.org/core/styles/states"
"cogentcore.org/core/system"
"cogentcore.org/core/tensor/table"
"cogentcore.org/core/tensor/tensorcore"
"cogentcore.org/core/tree"
Expand Down Expand Up @@ -284,6 +286,9 @@ func (pl *PlotEditor) GoUpdatePlot() {
pl.genPlot()
pl.NeedsRender()
pl.Scene.AsyncUnlock()
if core.TheApp.Platform() == system.Web {
time.Sleep(time.Millisecond) // critical to prevent hanging!
}
}

// UpdatePlot updates the display based on current IndexView into table.
Expand Down

0 comments on commit 2fe38ad

Please sign in to comment.