added karax.runLater
This commit is contained in:
parent
ec4a413a7b
commit
34e2b8b7b4
1 changed files with 6 additions and 0 deletions
|
|
@ -539,3 +539,9 @@ proc loadScript*(jsfilename: cstring; kxi: KaraxInstance = kxi) =
|
|||
s.setAttr "src", jsfilename
|
||||
body.prepend(s)
|
||||
redraw(kxi)
|
||||
|
||||
proc runLater*(action: proc(); later = 400): Timeout {.discardable.} =
|
||||
proc wrapper() =
|
||||
action()
|
||||
redraw()
|
||||
result = setTimeout(wrapper, later)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue