Skip to content

Commit ee5dd8e

Browse files
authored
Merge pull request #1 from hyoo-ru/new-tree2
$mol_view_tree2 refactor, hyoo-ru/mam_mol#646
2 parents 4459fe1 + 5fb0ca9 commit ee5dd8e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

life.view.tree

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ $hyoo_life $mol_page
22
title @ \the Life Game
33
plugins /
44
<= Theme $mol_theme_auto
5+
speed? 0
56
head /
67
<= Title
78
<= Step $mol_button_minor
89
sub / <= Step_icon $mol_icon_step_forward
910
click <= step
1011
<= Time $mol_switch
11-
value?val <=> speed?val 0
12+
value? <=> speed_str? \
1213
options *
1314
5 <= Normal $mol_icon_play
1415
1000 <= Fast $mol_icon_fast_forward

life.view.ts

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ namespace $.$$ {
1919
snapshot() {
2020
return this.$.$mol_state_arg.value( 'snapshot' ) ?? super.snapshot()
2121
}
22+
23+
speed_str(next?: string) {
24+
return String(this.speed(next === undefined ? next : Number(next)))
25+
}
2226

2327
step() {
2428
this.speed(0)

map/map.view.tree

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ $hyoo_life_map $mol_plot_pane
33
gap_vert 0
44
-
55
zoom?val 16
6-
scale $mol_vector_2d /
6+
scale $mol_vector_2d<number> /
77
<= zoom
88
<= zoom
99
-
10+
step null
1011
style *
1112
^
1213
backgroundSize <= grid_size \

0 commit comments

Comments
 (0)