[fix] widget:weekview:initial-ywd
This commit is contained in:
parent
81a8c6e52b
commit
a5c09d11f0
|
|
@ -168,17 +168,25 @@ namespace _dali.widgets
|
|||
this.show_begin_time = show_begin_time;
|
||||
|
||||
// state
|
||||
const ywd_now : lib_plankton.pit.type_ywd = lib_plankton.pit.to_ywd(lib_plankton.pit.now());
|
||||
// const ywd_now : lib_plankton.pit.type_ywd = lib_plankton.pit.to_ywd(lib_plankton.pit.now());
|
||||
const ywd_begin : lib_plankton.pit.type_ywd = lib_plankton.call.convey(
|
||||
lib_plankton.pit.now(),
|
||||
[
|
||||
x => lib_plankton.pit.shift_week(x, -1),
|
||||
lib_plankton.pit.to_ywd,
|
||||
]
|
||||
);
|
||||
|
||||
this.vertical = vertical;
|
||||
this.year = (
|
||||
initial_year
|
||||
??
|
||||
ywd_now.year
|
||||
ywd_begin.year
|
||||
);
|
||||
this.week = (
|
||||
initial_week
|
||||
??
|
||||
Math.max(0, (ywd_now.week - 1))
|
||||
ywd_begin.week
|
||||
);
|
||||
this.count = initial_count;
|
||||
this.event_map = lib_plankton.map.hashmap.implementation_map(
|
||||
|
|
|
|||
Loading…
Reference in a new issue