File tree Expand file tree Collapse file tree 2 files changed +18
-19
lines changed
Expand file tree Collapse file tree 2 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 77package main
88
99import (
10- "cogentcore.org/core/core"
11- "cogentcore.org/core/htmlcore"
12- "cogentcore.org/core/styles"
1310 "cogentcore.org/core/tree"
1411 "github.com/compcogneuro/web/sims/stability"
1512 "github.com/compcogneuro/web/sims/urakubo"
@@ -36,19 +33,3 @@ func init() {
3633 "urakubo" : e [urakubo.Sim , urakubo.Config ],
3734 }
3835}
39-
40- func AddSims (ctx * htmlcore.Context ) {
41- for nm , em := range sims {
42- snm := "sim-" + nm
43- ctx .ElementHandlers [snm ] = func (ctx * htmlcore.Context ) bool {
44- fr := core .NewFrame (ctx .BlockParent )
45- fr .SetName (snm )
46- fr .Styler (func (s * styles.Style ) {
47- s .Direction = styles .Column
48- s .Grow .Set (1 , 1 )
49- })
50- em (fr )
51- return true
52- }
53- }
54- }
Original file line number Diff line number Diff line change 99
1010 "cogentcore.org/core/content"
1111 "cogentcore.org/core/core"
12+ "cogentcore.org/core/htmlcore"
13+ "cogentcore.org/core/styles"
1214 "cogentcore.org/core/text/csl"
1315 _ "cogentcore.org/core/text/tex" // include this to get math
1416 "cogentcore.org/core/tree"
@@ -56,3 +58,19 @@ func main() {
5658
5759 b .RunMainWindow ()
5860}
61+
62+ func AddSims (ctx * htmlcore.Context ) {
63+ for nm , em := range sims {
64+ snm := "sim-" + nm
65+ ctx .ElementHandlers [snm ] = func (ctx * htmlcore.Context ) bool {
66+ fr := core .NewFrame (ctx .BlockParent )
67+ fr .SetName (snm )
68+ fr .Styler (func (s * styles.Style ) {
69+ s .Direction = styles .Column
70+ s .Grow .Set (1 , 1 )
71+ })
72+ em (fr )
73+ return true
74+ }
75+ }
76+ }
You can’t perform that action at this time.
0 commit comments