File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ const eventDefaults = {
99 func_act : '' ,
1010 tolerance : '1e-16'
1111 } ,
12+ 'ScheduleList' : {
13+ times_evt : '' ,
14+ func_act : '' ,
15+ tolerance : '1e-16'
16+ } ,
1217 'ZeroCrossingDown' : {
1318 func_evt : '' ,
1419 func_act : '' ,
@@ -47,7 +52,8 @@ const EventsTab = ({ events, setEvents }) => {
4752
4853 const eventTypes = [
4954 'Condition' ,
50- 'Schedule' ,
55+ 'Schedule' ,
56+ 'ScheduleList' ,
5157 'ZeroCrossing' ,
5258 'ZeroCrossingUp' ,
5359 'ZeroCrossingDown'
@@ -75,13 +81,13 @@ const EventsTab = ({ events, setEvents }) => {
7581 // Validate required fields based on event type
7682
7783 // For Schedule, func_act is required
78- if ( currentEvent . type === 'Schedule' && ! currentEvent . func_act ) {
84+ if ( [ 'Schedule' , 'ScheduleList' ] . includes ( currentEvent . type ) && ! currentEvent . func_act ) {
7985 alert ( 'func_act is required for Schedule events' ) ;
8086 return ;
8187 }
8288
8389 // For other event types, both func_evt and func_act are typically required
84- if ( currentEvent . type !== 'Schedule' && ( ! currentEvent . func_evt || ! currentEvent . func_act ) ) {
90+ if ( ! [ 'Schedule' , 'ScheduleList' ] . includes ( currentEvent . type ) && ( ! currentEvent . func_evt || ! currentEvent . func_act ) ) {
8591 alert ( 'Both func_evt and func_act are required for this event type' ) ;
8692 return ;
8793 }
Original file line number Diff line number Diff line change 9393 "ZeroCrossingUp" : pathsim .events .ZeroCrossingUp ,
9494 "ZeroCrossing" : pathsim .events .ZeroCrossing ,
9595 "Schedule" : pathsim .events .Schedule ,
96+ "ScheduleList" : pathsim .events .ScheduleList ,
9697 "Condition" : pathsim .events .Condition ,
9798}
9899
You can’t perform that action at this time.
0 commit comments