cpee 2.1.91 → 2.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +7 -0
- data/cockpit/css/llm.css +1 -1
- data/cockpit/css/resources-label.css +1 -1
- data/cockpit/css/ui.css +6 -6
- data/cockpit/css/wfadaptor.css +103 -189
- data/cockpit/edit.html +2 -2
- data/cockpit/index.html +3 -2
- data/cockpit/js/details.js +11 -1
- data/cockpit/js/instance.js +54 -31
- data/cockpit/js/wfadaptor.js +604 -140
- data/cockpit/llm.html +2 -2
- data/cockpit/llm_alternative.html +2 -2
- data/cockpit/model.html +1 -1
- data/cockpit/only_llm.html +5 -7
- data/cockpit/templates/Frames.xml +142 -55
- data/cockpit/themes/base.js +226 -130
- data/cockpit/themes/control/rngs/call.rng +14 -0
- data/cockpit/themes/control/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/control/rngs/choose.rng +4 -1
- data/cockpit/themes/control/rngs/manipulate.rng +15 -1
- data/cockpit/themes/control/rngs/start.rng +133 -119
- data/cockpit/themes/control/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/control/symbols/alternative.svg +13 -3
- data/cockpit/themes/control/symbols/arrow.svg +1 -1
- data/cockpit/themes/control/symbols/call.svg +15 -2
- data/cockpit/themes/control/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/control/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/control/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/control/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/control/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/control/symbols/choose.svg +13 -3
- data/cockpit/themes/control/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/{compact/symbols/choose.svg → control/symbols/choose_exclusive_finish.svg} +1 -1
- data/cockpit/themes/control/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/{compact/symbols/choose_inclusive.svg → control/symbols/choose_inclusive_finish.svg} +1 -1
- data/cockpit/themes/control/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/control/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/control/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/control/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/control/symbols/complex.svg +1 -1
- data/cockpit/themes/control/symbols/critical.svg +3 -2
- data/cockpit/themes/control/symbols/delete.svg +2 -2
- data/cockpit/themes/control/symbols/end.svg +1 -1
- data/cockpit/themes/control/symbols/escape.svg +2 -2
- data/cockpit/themes/control/symbols/event_end.svg +1 -1
- data/cockpit/themes/control/symbols/loop.svg +13 -3
- data/cockpit/themes/control/symbols/loop_end.svg +15 -0
- data/cockpit/themes/control/symbols/manipulate.svg +17 -2
- data/cockpit/themes/control/symbols/otherwise.svg +3 -3
- data/cockpit/themes/control/symbols/parallel.svg +3 -2
- data/cockpit/themes/control/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/control/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/control/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/control/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/control/symbols/scripts.svg +2 -2
- data/cockpit/themes/control/symbols/start.svg +1 -1
- data/cockpit/themes/control/symbols/start_event.svg +1 -1
- data/cockpit/themes/control/symbols/stop.svg +1 -1
- data/cockpit/themes/control/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/control/theme.js +95 -95
- data/cockpit/themes/dataflow/rngs/call.rng +14 -0
- data/cockpit/themes/dataflow/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/dataflow/rngs/choose.rng +4 -1
- data/cockpit/themes/dataflow/rngs/manipulate.rng +15 -1
- data/cockpit/themes/dataflow/rngs/start.rng +133 -119
- data/cockpit/themes/dataflow/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/dataflow/symbols/alternative.svg +13 -3
- data/cockpit/themes/dataflow/symbols/arrow.svg +1 -1
- data/cockpit/themes/dataflow/symbols/call.svg +15 -2
- data/cockpit/themes/dataflow/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/dataflow/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/dataflow/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/dataflow/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/dataflow/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/dataflow/symbols/choose.svg +13 -3
- data/cockpit/themes/dataflow/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/{compact/symbols/choose_exclusive.svg → dataflow/symbols/choose_exclusive_finish.svg} +1 -1
- data/cockpit/themes/dataflow/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/{compact/symbols/parallel.svg → dataflow/symbols/choose_inclusive_finish.svg} +2 -3
- data/cockpit/themes/dataflow/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/dataflow/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/dataflow/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/dataflow/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/dataflow/symbols/complex.svg +1 -1
- data/cockpit/themes/dataflow/symbols/critical.svg +3 -2
- data/cockpit/themes/dataflow/symbols/delete.svg +2 -2
- data/cockpit/themes/dataflow/symbols/end.svg +1 -1
- data/cockpit/themes/dataflow/symbols/escape.svg +2 -2
- data/cockpit/themes/dataflow/symbols/event_end.svg +1 -1
- data/cockpit/themes/dataflow/symbols/loop.svg +13 -3
- data/cockpit/themes/dataflow/symbols/loop_end.svg +15 -0
- data/cockpit/themes/dataflow/symbols/manipulate.svg +17 -2
- data/cockpit/themes/dataflow/symbols/otherwise.svg +3 -3
- data/cockpit/themes/dataflow/symbols/parallel.svg +3 -2
- data/cockpit/themes/dataflow/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/dataflow/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/dataflow/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/dataflow/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/dataflow/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/dataflow/symbols/scripts.svg +2 -2
- data/cockpit/themes/dataflow/symbols/start.svg +1 -1
- data/cockpit/themes/dataflow/symbols/start_event.svg +1 -1
- data/cockpit/themes/dataflow/symbols/stop.svg +1 -1
- data/cockpit/themes/dataflow/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/dataflow/theme.js +9 -6
- data/cockpit/themes/default/rngs/call.rng +14 -0
- data/cockpit/themes/default/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/default/rngs/choose.rng +4 -1
- data/cockpit/themes/default/rngs/manipulate.rng +15 -1
- data/cockpit/themes/default/rngs/start.rng +133 -119
- data/cockpit/themes/default/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/default/symbols/alternative.svg +13 -3
- data/cockpit/themes/default/symbols/arrow.svg +1 -1
- data/cockpit/themes/default/symbols/call.svg +15 -2
- data/cockpit/themes/default/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/default/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/default/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/default/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/default/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/default/symbols/choose.svg +13 -3
- data/cockpit/themes/default/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/{compact/symbols/loop.svg → default/symbols/choose_exclusive_finish.svg} +1 -1
- data/cockpit/themes/default/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/{compact/symbols/parallel_branch_compact.svg → default/symbols/choose_inclusive_finish.svg} +2 -2
- data/cockpit/themes/default/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/default/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/default/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/default/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/default/symbols/complex.svg +1 -1
- data/cockpit/themes/default/symbols/critical.svg +3 -2
- data/cockpit/themes/default/symbols/delete.svg +2 -2
- data/cockpit/themes/default/symbols/end.svg +1 -1
- data/cockpit/themes/default/symbols/escape.svg +2 -2
- data/cockpit/themes/default/symbols/event_end.svg +1 -1
- data/cockpit/themes/default/symbols/loop.svg +13 -3
- data/cockpit/themes/default/symbols/loop_end.svg +15 -0
- data/cockpit/themes/default/symbols/manipulate.svg +17 -2
- data/cockpit/themes/default/symbols/otherwise.svg +3 -3
- data/cockpit/themes/default/symbols/parallel.svg +3 -2
- data/cockpit/themes/default/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/default/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/default/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/default/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/default/symbols/scripts.svg +2 -2
- data/cockpit/themes/default/symbols/start.svg +1 -1
- data/cockpit/themes/default/symbols/start_event.svg +1 -1
- data/cockpit/themes/default/symbols/stop.svg +1 -1
- data/cockpit/themes/default/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/default/theme.js +7 -1
- data/cockpit/themes/extended/rngs/call.rng +14 -0
- data/cockpit/themes/extended/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/extended/rngs/choose.rng +4 -1
- data/cockpit/themes/extended/rngs/manipulate.rng +15 -1
- data/cockpit/themes/extended/rngs/start.rng +133 -119
- data/cockpit/themes/extended/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/extended/symbols/alternative.svg +13 -3
- data/cockpit/themes/extended/symbols/arrow.svg +1 -1
- data/cockpit/themes/extended/symbols/call.svg +15 -2
- data/cockpit/themes/extended/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/extended/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/extended/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/extended/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/extended/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/extended/symbols/choose.svg +13 -3
- data/cockpit/themes/extended/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/extended/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/extended/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/{control/symbols/parallel_branch_compact.svg → extended/symbols/choose_inclusive_finish.svg} +2 -2
- data/cockpit/themes/extended/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/extended/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/extended/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/extended/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/extended/symbols/complex.svg +1 -1
- data/cockpit/themes/extended/symbols/critical.svg +3 -2
- data/cockpit/themes/extended/symbols/delete.svg +2 -2
- data/cockpit/themes/extended/symbols/end.svg +1 -1
- data/cockpit/themes/extended/symbols/escape.svg +2 -2
- data/cockpit/themes/extended/symbols/event_end.svg +1 -1
- data/cockpit/themes/extended/symbols/loop.svg +13 -3
- data/cockpit/themes/extended/symbols/loop_end.svg +15 -0
- data/cockpit/themes/extended/symbols/manipulate.svg +17 -2
- data/cockpit/themes/extended/symbols/otherwise.svg +3 -3
- data/cockpit/themes/extended/symbols/parallel.svg +3 -2
- data/cockpit/themes/extended/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/extended/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/extended/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/extended/symbols/scripts.svg +2 -2
- data/cockpit/themes/extended/symbols/start.svg +1 -1
- data/cockpit/themes/extended/symbols/start_event.svg +1 -1
- data/cockpit/themes/extended/symbols/stop.svg +1 -1
- data/cockpit/themes/extended/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/extended/theme.js +3 -0
- data/cockpit/themes/felix/symbols/alternative.svg +13 -3
- data/cockpit/themes/felix/symbols/arrow.svg +1 -1
- data/cockpit/themes/felix/symbols/call.svg +15 -2
- data/cockpit/themes/felix/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/felix/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/felix/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/felix/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/felix/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/felix/symbols/choose.svg +13 -3
- data/cockpit/themes/felix/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/felix/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/felix/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/felix/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/felix/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/felix/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/felix/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/felix/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/felix/symbols/complex.svg +1 -1
- data/cockpit/themes/felix/symbols/critical.svg +3 -2
- data/cockpit/themes/felix/symbols/delete.svg +2 -2
- data/cockpit/themes/felix/symbols/end.svg +1 -1
- data/cockpit/themes/felix/symbols/escape.svg +2 -2
- data/cockpit/themes/felix/symbols/event_end.svg +1 -1
- data/cockpit/themes/felix/symbols/loop.svg +13 -3
- data/cockpit/themes/felix/symbols/loop_end.svg +15 -0
- data/cockpit/themes/felix/symbols/manipulate.svg +17 -2
- data/cockpit/themes/felix/symbols/otherwise.svg +3 -3
- data/cockpit/themes/felix/symbols/parallel.svg +3 -2
- data/cockpit/themes/felix/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/felix/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/felix/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/felix/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/felix/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/felix/symbols/scripts.svg +2 -2
- data/cockpit/themes/felix/symbols/start.svg +1 -1
- data/cockpit/themes/felix/symbols/start_event.svg +1 -1
- data/cockpit/themes/felix/symbols/stop.svg +1 -1
- data/cockpit/themes/felix/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/model/symbols/alternative.svg +13 -3
- data/cockpit/themes/model/symbols/arrow.svg +1 -1
- data/cockpit/themes/model/symbols/call.svg +15 -2
- data/cockpit/themes/model/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/model/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/model/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/model/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/model/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/model/symbols/choose.svg +13 -3
- data/cockpit/themes/model/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/model/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/model/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/model/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/model/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/model/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/model/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/model/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/model/symbols/complex.svg +1 -1
- data/cockpit/themes/model/symbols/critical.svg +3 -2
- data/cockpit/themes/model/symbols/delete.svg +2 -2
- data/cockpit/themes/model/symbols/end.svg +1 -1
- data/cockpit/themes/model/symbols/escape.svg +2 -2
- data/cockpit/themes/model/symbols/event_end.svg +1 -1
- data/cockpit/themes/model/symbols/loop.svg +13 -3
- data/cockpit/themes/model/symbols/loop_end.svg +15 -0
- data/cockpit/themes/model/symbols/manipulate.svg +17 -2
- data/cockpit/themes/model/symbols/otherwise.svg +3 -3
- data/cockpit/themes/model/symbols/parallel.svg +3 -2
- data/cockpit/themes/model/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/model/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/model/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/model/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/model/symbols/scripts.svg +2 -2
- data/cockpit/themes/model/symbols/start.svg +1 -1
- data/cockpit/themes/model/symbols/start_event.svg +1 -1
- data/cockpit/themes/model/symbols/stop.svg +1 -1
- data/cockpit/themes/model/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/model/theme.js +68 -68
- data/cockpit/themes/packed/rngs/call.rng +14 -0
- data/cockpit/themes/packed/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/packed/rngs/choose.rng +4 -1
- data/cockpit/themes/packed/rngs/manipulate.rng +15 -1
- data/cockpit/themes/packed/rngs/start.rng +133 -119
- data/cockpit/themes/packed/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/packed/symbols/alternative.svg +13 -3
- data/cockpit/themes/packed/symbols/arrow.svg +1 -1
- data/cockpit/themes/packed/symbols/call.svg +15 -2
- data/cockpit/themes/packed/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/packed/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/packed/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/packed/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/packed/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/packed/symbols/choose.svg +13 -3
- data/cockpit/themes/packed/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/packed/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/packed/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/packed/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/packed/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/packed/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/packed/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/packed/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/packed/symbols/complex.svg +1 -1
- data/cockpit/themes/packed/symbols/critical.svg +3 -2
- data/cockpit/themes/packed/symbols/delete.svg +2 -2
- data/cockpit/themes/packed/symbols/end.svg +1 -1
- data/cockpit/themes/packed/symbols/escape.svg +2 -2
- data/cockpit/themes/packed/symbols/event_end.svg +1 -1
- data/cockpit/themes/packed/symbols/loop.svg +13 -3
- data/cockpit/themes/packed/symbols/loop_end.svg +15 -0
- data/cockpit/themes/packed/symbols/manipulate.svg +17 -2
- data/cockpit/themes/packed/symbols/otherwise.svg +3 -3
- data/cockpit/themes/packed/symbols/parallel.svg +3 -2
- data/cockpit/themes/packed/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/packed/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/packed/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/packed/symbols/scripts.svg +2 -2
- data/cockpit/themes/packed/symbols/start.svg +1 -1
- data/cockpit/themes/packed/symbols/start_event.svg +1 -1
- data/cockpit/themes/packed/symbols/stop.svg +1 -1
- data/cockpit/themes/packed/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/packed/theme.js +11 -7
- data/cockpit/themes/preset/rngs/call.rng +14 -0
- data/cockpit/themes/preset/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/preset/rngs/choose.rng +4 -1
- data/cockpit/themes/preset/rngs/manipulate.rng +15 -1
- data/cockpit/themes/preset/rngs/start.rng +133 -119
- data/cockpit/themes/preset/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/preset/symbols/alternative.svg +13 -3
- data/cockpit/themes/preset/symbols/arrow.svg +1 -1
- data/cockpit/themes/preset/symbols/call.svg +15 -2
- data/cockpit/themes/preset/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/preset/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/preset/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/preset/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/preset/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/preset/symbols/choose.svg +13 -3
- data/cockpit/themes/preset/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/preset/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/preset/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/preset/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/preset/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/preset/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/preset/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/preset/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/preset/symbols/complex.svg +1 -1
- data/cockpit/themes/preset/symbols/critical.svg +3 -2
- data/cockpit/themes/preset/symbols/delete.svg +2 -2
- data/cockpit/themes/preset/symbols/end.svg +1 -1
- data/cockpit/themes/preset/symbols/escape.svg +2 -2
- data/cockpit/themes/preset/symbols/event_end.svg +1 -1
- data/cockpit/themes/preset/symbols/loop.svg +13 -3
- data/cockpit/themes/preset/symbols/loop_end.svg +15 -0
- data/cockpit/themes/preset/symbols/manipulate.svg +17 -2
- data/cockpit/themes/preset/symbols/otherwise.svg +3 -3
- data/cockpit/themes/preset/symbols/parallel.svg +3 -2
- data/cockpit/themes/preset/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/preset/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/preset/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/preset/symbols/scripts.svg +2 -2
- data/cockpit/themes/preset/symbols/start.svg +1 -1
- data/cockpit/themes/preset/symbols/start_event.svg +1 -1
- data/cockpit/themes/preset/symbols/stop.svg +1 -1
- data/cockpit/themes/preset/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/preset/theme.js +7 -1
- data/cockpit/themes/{compact → presetaltid}/rngs/call.rng +14 -0
- data/cockpit/themes/{compact → presetaltid}/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/{compact → presetaltid}/rngs/choose.rng +4 -1
- data/cockpit/themes/{compact → presetaltid}/rngs/manipulate.rng +15 -1
- data/cockpit/themes/presetaltid/rngs/start.rng +145 -0
- data/cockpit/themes/presetaltid/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/presetaltid/symbols/alternative.svg +15 -0
- data/cockpit/themes/presetaltid/symbols/arrow.svg +3 -0
- data/cockpit/themes/presetaltid/symbols/call.svg +19 -0
- data/cockpit/themes/presetaltid/symbols/call_sensor.svg +23 -0
- data/cockpit/themes/presetaltid/symbols/callmanipulate.svg +23 -0
- data/cockpit/themes/presetaltid/symbols/callmanipulate_sensor.svg +26 -0
- data/cockpit/themes/presetaltid/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/presetaltid/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/presetaltid/symbols/choose.svg +15 -0
- data/cockpit/themes/presetaltid/symbols/choose_exclusive.svg +15 -0
- data/cockpit/themes/presetaltid/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/presetaltid/symbols/choose_inclusive.svg +13 -0
- data/cockpit/themes/presetaltid/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/{compact → presetaltid}/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/{compact → presetaltid}/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/{compact → presetaltid}/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/{compact → presetaltid}/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/{compact → presetaltid}/symbols/complex.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/critical.svg +5 -0
- data/cockpit/themes/presetaltid/symbols/delete.svg +4 -0
- data/cockpit/themes/presetaltid/symbols/end.svg +3 -0
- data/cockpit/themes/{compact → presetaltid}/symbols/escape.svg +2 -2
- data/cockpit/themes/presetaltid/symbols/event_end.svg +3 -0
- data/cockpit/themes/presetaltid/symbols/loop.svg +15 -0
- data/cockpit/themes/presetaltid/symbols/loop_end.svg +15 -0
- data/cockpit/themes/presetaltid/symbols/manipulate.svg +19 -0
- data/cockpit/themes/presetaltid/symbols/otherwise.svg +5 -0
- data/cockpit/themes/presetaltid/symbols/parallel.svg +6 -0
- data/cockpit/themes/presetaltid/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/{compact → presetaltid}/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/presetaltid/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/{compact → presetaltid}/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/{compact → presetaltid}/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/presetaltid/symbols/scripts.svg +4 -0
- data/cockpit/themes/presetaltid/symbols/start.svg +3 -0
- data/cockpit/themes/{compact → presetaltid}/symbols/start_event.svg +1 -1
- data/cockpit/themes/{compact → presetaltid}/symbols/stop.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/presetaltid/theme.js +16 -0
- data/cockpit/themes/presetid/rngs/alternative.rng +25 -0
- data/cockpit/themes/{compact/rngs/start.rng → presetid/rngs/call.rng} +130 -18
- data/cockpit/themes/presetid/rngs/callmanipulate.rng +275 -0
- data/cockpit/themes/presetid/rngs/choose.rng +17 -0
- data/cockpit/themes/presetid/rngs/closed_loop.rng +62 -0
- data/cockpit/themes/presetid/rngs/closed_loop_cancel.rng +5 -0
- data/cockpit/themes/presetid/rngs/closed_loop_control.rng +31 -0
- data/cockpit/themes/presetid/rngs/closed_loop_measuring.rng +12 -0
- data/cockpit/themes/presetid/rngs/critical.rng +5 -0
- data/cockpit/themes/presetid/rngs/escape.rng +1 -0
- data/cockpit/themes/presetid/rngs/group.rng +3 -0
- data/cockpit/themes/presetid/rngs/loop.rng +22 -0
- data/cockpit/themes/presetid/rngs/manipulate.rng +23 -0
- data/cockpit/themes/presetid/rngs/otherwise.rng +22 -0
- data/cockpit/themes/presetid/rngs/parallel.rng +27 -0
- data/cockpit/themes/presetid/rngs/parallel_branch.rng +2 -0
- data/cockpit/themes/presetid/rngs/scripts.rng +23 -0
- data/cockpit/themes/presetid/rngs/start.rng +145 -0
- data/cockpit/themes/presetid/rngs/stop.rng +5 -0
- data/cockpit/themes/presetid/rngs/terminate.rng +1 -0
- data/cockpit/themes/presetid/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/presetid/symbols/alternative.svg +15 -0
- data/cockpit/themes/presetid/symbols/arrow.svg +3 -0
- data/cockpit/themes/presetid/symbols/call.svg +19 -0
- data/cockpit/themes/presetid/symbols/call_sensor.svg +23 -0
- data/cockpit/themes/presetid/symbols/callmanipulate.svg +23 -0
- data/cockpit/themes/presetid/symbols/callmanipulate_sensor.svg +26 -0
- data/cockpit/themes/presetid/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/presetid/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/presetid/symbols/choose.svg +15 -0
- data/cockpit/themes/presetid/symbols/choose_exclusive.svg +15 -0
- data/cockpit/themes/presetid/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/presetid/symbols/choose_inclusive.svg +13 -0
- data/cockpit/themes/presetid/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/presetid/symbols/closed_loop.svg +5 -0
- data/cockpit/themes/presetid/symbols/closed_loop_cancel.svg +5 -0
- data/cockpit/themes/presetid/symbols/closed_loop_control.svg +5 -0
- data/cockpit/themes/presetid/symbols/closed_loop_measuring.svg +6 -0
- data/cockpit/themes/presetid/symbols/complex.svg +8 -0
- data/cockpit/themes/presetid/symbols/critical.svg +5 -0
- data/cockpit/themes/presetid/symbols/delete.svg +4 -0
- data/cockpit/themes/presetid/symbols/end.svg +3 -0
- data/cockpit/themes/presetid/symbols/escape.svg +5 -0
- data/cockpit/themes/presetid/symbols/event_end.svg +3 -0
- data/cockpit/themes/presetid/symbols/loop.svg +15 -0
- data/cockpit/themes/presetid/symbols/loop_end.svg +15 -0
- data/cockpit/themes/presetid/symbols/manipulate.svg +19 -0
- data/cockpit/themes/presetid/symbols/otherwise.svg +5 -0
- data/cockpit/themes/presetid/symbols/parallel.svg +6 -0
- data/cockpit/themes/presetid/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/presetid/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/presetid/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/presetid/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/presetid/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/presetid/symbols/scripts.svg +4 -0
- data/cockpit/themes/presetid/symbols/start.svg +3 -0
- data/cockpit/themes/presetid/symbols/start_event.svg +5 -0
- data/cockpit/themes/presetid/symbols/stop.svg +5 -0
- data/cockpit/themes/{compact/symbols/end.svg → presetid/symbols/terminate.svg} +1 -0
- data/cockpit/themes/presetid/symbols/wait_for_signal.svg +21 -0
- data/cockpit/themes/presetid/theme.js +16 -0
- data/cockpit/themes/reduced/rngs/call.rng +14 -0
- data/cockpit/themes/reduced/rngs/callmanipulate.rng +18 -1
- data/cockpit/themes/reduced/rngs/choose.rng +4 -1
- data/cockpit/themes/reduced/rngs/manipulate.rng +15 -1
- data/cockpit/themes/reduced/rngs/start.rng +133 -119
- data/cockpit/themes/reduced/rngs/wait_for_signal.rng +8 -0
- data/cockpit/themes/reduced/symbols/alternative.svg +13 -3
- data/cockpit/themes/reduced/symbols/arrow.svg +1 -1
- data/cockpit/themes/reduced/symbols/call.svg +15 -2
- data/cockpit/themes/reduced/symbols/call_sensor.svg +19 -5
- data/cockpit/themes/reduced/symbols/callmanipulate.svg +19 -4
- data/cockpit/themes/reduced/symbols/callmanipulate_sensor.svg +22 -7
- data/cockpit/themes/reduced/symbols/callmanipulate_sensor_signal.svg +32 -0
- data/cockpit/themes/reduced/symbols/callmanipulate_signal.svg +29 -0
- data/cockpit/themes/reduced/symbols/choose.svg +13 -3
- data/cockpit/themes/reduced/symbols/choose_exclusive.svg +13 -3
- data/cockpit/themes/reduced/symbols/choose_exclusive_finish.svg +5 -0
- data/cockpit/themes/reduced/symbols/choose_inclusive.svg +11 -2
- data/cockpit/themes/reduced/symbols/choose_inclusive_finish.svg +4 -0
- data/cockpit/themes/reduced/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/reduced/symbols/closed_loop_cancel.svg +2 -2
- data/cockpit/themes/reduced/symbols/closed_loop_control.svg +2 -2
- data/cockpit/themes/reduced/symbols/closed_loop_measuring.svg +2 -2
- data/cockpit/themes/reduced/symbols/complex.svg +1 -1
- data/cockpit/themes/reduced/symbols/critical.svg +3 -2
- data/cockpit/themes/reduced/symbols/delete.svg +2 -2
- data/cockpit/themes/reduced/symbols/end.svg +1 -1
- data/cockpit/themes/reduced/symbols/escape.svg +2 -2
- data/cockpit/themes/reduced/symbols/event_end.svg +1 -1
- data/cockpit/themes/reduced/symbols/loop.svg +13 -3
- data/cockpit/themes/reduced/symbols/loop_end.svg +15 -0
- data/cockpit/themes/reduced/symbols/manipulate.svg +17 -2
- data/cockpit/themes/reduced/symbols/otherwise.svg +3 -3
- data/cockpit/themes/reduced/symbols/parallel.svg +3 -2
- data/cockpit/themes/reduced/symbols/parallel_branch.svg +3 -3
- data/cockpit/themes/reduced/symbols/parallel_branch_event.svg +4 -4
- data/cockpit/themes/reduced/symbols/parallel_branch_normal.svg +3 -3
- data/cockpit/themes/reduced/symbols/parallel_eventbased_exclusive.svg +4 -4
- data/cockpit/themes/reduced/symbols/parallel_eventbased_parallel.svg +3 -3
- data/cockpit/themes/reduced/symbols/scripts.svg +2 -2
- data/cockpit/themes/reduced/symbols/start.svg +1 -1
- data/cockpit/themes/reduced/symbols/start_event.svg +1 -1
- data/cockpit/themes/reduced/symbols/stop.svg +1 -1
- data/cockpit/themes/reduced/symbols/wait_for_signal.svg +21 -0
- data/contrib/logo2a-favicon.png +0 -0
- data/contrib/logo2a-favicon.svg +423 -0
- data/cpee.gemspec +1 -1
- data/server/executionhandlers/ruby/connection.rb +9 -1
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +18 -1
- data/server/routing/end.pid +1 -1
- data/server/routing/forward-events-00.pid +1 -1
- data/server/routing/forward-votes.pid +1 -1
- data/server/routing/persist.pid +1 -1
- metadata +187 -68
- data/cockpit/themes/compact/symbols/alternative.svg +0 -5
- data/cockpit/themes/compact/symbols/arrow.svg +0 -3
- data/cockpit/themes/compact/symbols/call.svg +0 -6
- data/cockpit/themes/compact/symbols/call_sensor.svg +0 -9
- data/cockpit/themes/compact/symbols/callmanipulate.svg +0 -8
- data/cockpit/themes/compact/symbols/callmanipulate_sensor.svg +0 -11
- data/cockpit/themes/compact/symbols/critical.svg +0 -4
- data/cockpit/themes/compact/symbols/delete.svg +0 -4
- data/cockpit/themes/compact/symbols/event_end.svg +0 -3
- data/cockpit/themes/compact/symbols/manipulate.svg +0 -4
- data/cockpit/themes/compact/symbols/otherwise.svg +0 -5
- data/cockpit/themes/compact/symbols/parallel_branch.svg +0 -5
- data/cockpit/themes/compact/symbols/parallel_branch_normal.svg +0 -5
- data/cockpit/themes/compact/symbols/scripts.svg +0 -4
- data/cockpit/themes/compact/symbols/start.svg +0 -3
- data/cockpit/themes/compact/theme.js +0 -13
- data/cockpit/themes/dataflow/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/default/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/extended/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/felix/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/model/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/packed/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/preset/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/reduced/symbols/parallel_branch_compact.svg +0 -4
- data/server/executionhandlers/ruby/ShiftingTestSimple.xml +0 -100
- data/server/server.pid +0 -1
- /data/cockpit/themes/{compact → presetaltid}/rngs/alternative.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/closed_loop.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/closed_loop_cancel.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/closed_loop_control.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/closed_loop_measuring.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/critical.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/escape.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/group.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/loop.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/otherwise.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/parallel.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/parallel_branch.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/scripts.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/stop.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/rngs/terminate.rng +0 -0
- /data/cockpit/themes/{compact → presetaltid}/symbols/terminate.svg +0 -0
data/cockpit/js/wfadaptor.js
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
<http://www.gnu.org/licenses/>.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
var high;
|
|
18
|
+
|
|
17
19
|
// TODO: changes in svg-script:
|
|
18
20
|
// 1) drawing functions
|
|
19
21
|
// 2) creation of svg-container (Bug: arrows on lines)
|
|
@@ -63,9 +65,10 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
63
65
|
|
|
64
66
|
this.update = function(doit){ doit(self); };
|
|
65
67
|
|
|
66
|
-
$.getScript(theme_base, function() {
|
|
68
|
+
$.getScript(theme_base, function() { //{{{
|
|
67
69
|
manifestation = new WFAdaptorManifestation(self);
|
|
68
70
|
illustrator.compact = manifestation.compact == true ? true : false;
|
|
71
|
+
illustrator.rotated_labels = manifestation.rotated_labels == true ? true : false;
|
|
69
72
|
illustrator.striped = manifestation.striped == true ? true : false;
|
|
70
73
|
description.source = manifestation.source;
|
|
71
74
|
var deferreds = [];
|
|
@@ -166,7 +169,7 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
166
169
|
manifestation.elements[element].description = [ manifestation.elements[element].description ];
|
|
167
170
|
}
|
|
168
171
|
if ($.isArray(manifestation.elements[element].description)) {
|
|
169
|
-
|
|
172
|
+
manifestation.elements[element].description.forEach(function(val,ind){
|
|
170
173
|
deferreds.push(
|
|
171
174
|
$.ajax({
|
|
172
175
|
type: "GET",
|
|
@@ -189,7 +192,7 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
189
192
|
$.when.apply($, deferreds).then(function(x) {
|
|
190
193
|
doit(self);
|
|
191
194
|
});
|
|
192
|
-
});
|
|
195
|
+
}); //}}}
|
|
193
196
|
} // }}}
|
|
194
197
|
|
|
195
198
|
// WfIllustrator:
|
|
@@ -197,33 +200,44 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
197
200
|
function WfIllustrator(wf_adaptor) { // View {{{
|
|
198
201
|
// Variable {{{
|
|
199
202
|
// public
|
|
203
|
+
this.endclipshift = 17;
|
|
200
204
|
this.height = 40;
|
|
201
205
|
this.width = 40;
|
|
202
206
|
this.default_width = 40;
|
|
203
207
|
this.default_height = 40;
|
|
204
208
|
this.height_shift = this.height * 0.26;
|
|
205
209
|
this.width_shift = this.width * 0.39;
|
|
210
|
+
this.width_shift_label = 7;
|
|
211
|
+
this.group_extend = 1;
|
|
206
212
|
this.elements = {}; // the svgs
|
|
207
213
|
this.svg = {};
|
|
208
214
|
this.draw = {};
|
|
215
|
+
this.dim = {};
|
|
216
|
+
this.dim.symbols = [];
|
|
217
|
+
this.dim.connections = [];
|
|
209
218
|
this.compact = true;
|
|
219
|
+
this.rotated_labels = true;
|
|
210
220
|
this.striped = true;
|
|
221
|
+
this.global_style = {};
|
|
211
222
|
// private
|
|
212
223
|
var self = this;
|
|
213
224
|
var adaptor = null;
|
|
214
225
|
// }}}
|
|
215
|
-
//
|
|
226
|
+
// Internal Functions
|
|
216
227
|
this.set_label_container = function(con) { // {{{
|
|
217
228
|
self.svg.label_container = con;
|
|
218
229
|
} // }}}
|
|
219
230
|
this.set_svg_container = function(con) { // {{{
|
|
220
231
|
self.svg.container = con;
|
|
221
232
|
self.svg.container.append($X('<defs xmlns="http://www.w3.org/2000/svg">' +
|
|
222
|
-
' <marker id="arrow" viewBox="0 0 10 10" refX="
|
|
233
|
+
' <marker id="arrow" viewBox="0 0 10 10" refX="28.5" refY="5" orient="auto" markerUnits="strokeWidth" markerWidth="14" markerHeight="3.5">' +
|
|
223
234
|
' <path d="m 2 2 l 6 3 l -6 3 z"/>' +
|
|
224
235
|
' </marker>' +
|
|
225
|
-
' <clipPath id="
|
|
226
|
-
' <rect x="-1" y="-1" width="
|
|
236
|
+
' <clipPath id="startclip">' +
|
|
237
|
+
' <rect x="-1" y="-1" width="29" height="32"/>' +
|
|
238
|
+
' </clipPath>' +
|
|
239
|
+
' <clipPath id="endclip">' +
|
|
240
|
+
' <rect x="20" y="-1" width="' + self.endclipshift + '" height="35"/>' +
|
|
227
241
|
' </clipPath>' +
|
|
228
242
|
'</defs>'));
|
|
229
243
|
self.svg.defs = {};
|
|
@@ -238,16 +252,28 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
238
252
|
self.svg.defs[element] = sym;
|
|
239
253
|
}
|
|
240
254
|
} // }}}
|
|
241
|
-
|
|
242
|
-
|
|
255
|
+
this.set_svg_direct = function(svg) { // {{{
|
|
256
|
+
self.svg.container.append(svg);
|
|
257
|
+
let bb = svg[0].getBBox();
|
|
258
|
+
self.svg.container.attr('height', bb.y + bb.height + self.height_shift); // small border on the bottom
|
|
259
|
+
self.svg.container.attr('width', bb.x + bb.width + self.width_shift); // small border on the right
|
|
243
260
|
} // }}}
|
|
244
261
|
this.set_svg = function(graph) { // {{{
|
|
245
|
-
if(graph.max.row < 1) graph.max.row = 1;
|
|
246
|
-
if(graph.max.col < 1) graph.max.col = 1;
|
|
247
|
-
self.svg.container.attr('height', (graph.max.row) * self.height + self.height_shift);
|
|
248
|
-
self.svg.container.attr('width', (graph.max.col+0.55) * self.width );
|
|
249
262
|
self.svg.container.append(graph.svg);
|
|
263
|
+
let bb = graph.svg[0].getBBox();
|
|
264
|
+
self.svg.container.attr('height', bb.y + bb.height + self.height_shift); // small border on the bottom
|
|
265
|
+
self.svg.container.attr('width', bb.x + bb.width + self.width_shift); // small border on the right
|
|
266
|
+
self.svg.container.attr('data-pos-matrix', JSON.stringify(self.dim.symbols));
|
|
267
|
+
self.svg.container.attr('data-con-list', JSON.stringify(self.dim.connections));
|
|
250
268
|
} // }}}
|
|
269
|
+
this.set_duration = function(start) { //{{{
|
|
270
|
+
self.svg.container.append(
|
|
271
|
+
$X('<text class="duration" transform="translate(3,' + self.height_shift + ') rotate(90)" xmlns="http://www.w3.org/2000/svg">' +
|
|
272
|
+
Math.trunc(performance.now()-start) + ' ms' +
|
|
273
|
+
'</text>')
|
|
274
|
+
);
|
|
275
|
+
} //}}}
|
|
276
|
+
|
|
251
277
|
this.get_node_by_svg_id = function(svg_id) { // {{{
|
|
252
278
|
return $('[element-id = \'' + svg_id + '\'] g.activities', self.svg.container);
|
|
253
279
|
} // }}}
|
|
@@ -260,126 +286,510 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
260
286
|
this.get_labels = function() { // {{{
|
|
261
287
|
return $('[element-id]', self.svg.label_container);
|
|
262
288
|
} // }}}
|
|
263
|
-
|
|
289
|
+
|
|
290
|
+
// External Functions
|
|
291
|
+
var clear = this.clear = function() { // {{{
|
|
292
|
+
$('> :not(defs)', self.svg.container).each(function() {$(this).remove()});
|
|
293
|
+
$('> defs > [belongs-to=element]', self.svg.container).each(function() {$(this).remove()});
|
|
294
|
+
self.dim.symbols = [];
|
|
295
|
+
} // }}}
|
|
296
|
+
var get_symbol = this.get_symbol = function() { // {{{
|
|
297
|
+
} // }}}
|
|
298
|
+
var get_properties = this.get_symbol = function() { // {{{
|
|
299
|
+
} // }}}
|
|
300
|
+
|
|
264
301
|
// Helper Functions {{{
|
|
265
|
-
var
|
|
302
|
+
var debug_dim = this.dim.debug = function() { //{{{
|
|
303
|
+
line = '\n';
|
|
304
|
+
for (let i=1; i < self.dim.symbols.length; i++) {
|
|
305
|
+
line += $.sprintf('%02d',i) + ': ';
|
|
306
|
+
if (self.dim.symbols[i]) {
|
|
307
|
+
for (let j=1; j < self.dim.symbols[i].length; j++) {
|
|
308
|
+
line += ' [ ';
|
|
309
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][j] && self.dim.symbols[i][j].x) { line += $.sprintf('%3d',self.dim.symbols[i][j].x); } else { line += ' '; }
|
|
310
|
+
line += ', ';
|
|
311
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][j] && self.dim.symbols[i][j].width) { line += $.sprintf('%3d',self.dim.symbols[i][j].width); } else { line += ' '; }
|
|
312
|
+
line += ' ] ';
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
line += "\n";
|
|
316
|
+
}
|
|
317
|
+
return line;
|
|
318
|
+
} //}}}
|
|
319
|
+
|
|
320
|
+
var set_x = this.dim.set_x = function(row,col,twidth,sname) { //{{{
|
|
321
|
+
if (!self.dim.symbols[row]) { self.dim.symbols[row] = []; }
|
|
322
|
+
if (!self.dim.symbols[row][col]) { self.dim.symbols[row][col] = {}; }
|
|
323
|
+
|
|
324
|
+
if (self.dim.symbols[row-1] && self.dim.symbols[row-1][col] && self.dim.symbols[row-1][col].x) { // row before
|
|
325
|
+
self.dim.symbols[row][col].x = self.dim.symbols[row-1][col].x;
|
|
326
|
+
} else if (self.dim.symbols[row] && self.dim.symbols[row][col-1] && self.dim.symbols[row][col-1].x) { // column before
|
|
327
|
+
let mx = 0;
|
|
328
|
+
for (let i=row; i<self.dim.symbols.length; i++) {
|
|
329
|
+
if (self.dim.symbols[i][col-1] && mx < self.dim.symbols[i][col-1].x + self.dim.symbols[i][col-1].width) {
|
|
330
|
+
mx = self.dim.symbols[i][col-1].x + self.dim.symbols[i][col-1].width;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
self.dim.symbols[row][col].x = mx;
|
|
334
|
+
} else if (self.dim.symbols[row-1] && self.dim.symbols[row-1][col-1] && self.dim.symbols[row-1][col-1].x) { // diagonal left above
|
|
335
|
+
self.dim.symbols[row][col].x = self.dim.symbols[row-1][col-1].x + self.dim.symbols[row-1][col-1].width;
|
|
336
|
+
} else if (self.dim.symbols.length > row + 1) { // same column below
|
|
337
|
+
let mx = 0;
|
|
338
|
+
for (let i=row; i<self.dim.symbols.length; i++) {
|
|
339
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][col] && mx < self.dim.symbols[i][col].x) {
|
|
340
|
+
mx = self.dim.symbols[i][col].x;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
self.dim.symbols[row][col].x = mx;
|
|
344
|
+
} else { // same column above
|
|
345
|
+
let mx = 0;
|
|
346
|
+
for (let i=row; i>0; i--) {
|
|
347
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][col] && mx < self.dim.symbols[i][col].x) {
|
|
348
|
+
mx = self.dim.symbols[i][col].x;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
self.dim.symbols[row][col].x = mx;
|
|
352
|
+
}
|
|
353
|
+
if (self.dim.symbols[row][col].width) {
|
|
354
|
+
if (twidth > self.dim.symbols[row][col].width) {
|
|
355
|
+
self.dim.symbols[row][col].width = twidth;
|
|
356
|
+
}
|
|
357
|
+
} else {
|
|
358
|
+
self.dim.symbols[row][col].width = twidth;
|
|
359
|
+
}
|
|
360
|
+
self.dim.symbols[row][col].type = sname;
|
|
361
|
+
// console.log('set_x ',row,col,debug_dim());
|
|
362
|
+
} //}}}
|
|
363
|
+
var set_x_cond = this.dim.set_x_cond = function(row,col,tx,twidth,sname,label,subtype) { //{{{
|
|
364
|
+
if (!self.dim.symbols[row]) { self.dim.symbols[row] = []; }
|
|
365
|
+
if (!self.dim.symbols[row][col] || self.dim.symbols[row][col].width < twidth) {
|
|
366
|
+
self.dim.symbols[row][col] = {};
|
|
367
|
+
self.dim.symbols[row][col].x = tx;
|
|
368
|
+
self.dim.symbols[row][col].width = twidth;
|
|
369
|
+
}
|
|
370
|
+
self.dim.symbols[row][col].type = sname;
|
|
371
|
+
self.dim.symbols[row][col].label = label;
|
|
372
|
+
self.dim.symbols[row][col].subtype = subtype;
|
|
373
|
+
// console.log('set_x_cond',row,col,debug_dim());
|
|
374
|
+
} //}}}
|
|
375
|
+
|
|
376
|
+
var get_x = this.dim.get_x = function(row,col,deb='') { //{{{
|
|
377
|
+
if (row<0) { row = 0 };
|
|
378
|
+
|
|
379
|
+
let mlen = 0;
|
|
380
|
+
if (self.dim.symbols[row] && self.dim.symbols[row][col] && self.dim.symbols[row][col].x) { // this column
|
|
381
|
+
mlen = self.dim.symbols[row][col].x;
|
|
382
|
+
} else if (self.dim.symbols[row] && !self.dim.symbols[row][col] && self.dim.symbols.length > row && self.dim.symbols[row+1] && self.dim.symbols[row+1][col] && self.dim.symbols[row+1][col].x ) { // row after
|
|
383
|
+
mlen = self.dim.symbols[row+1][col].x;
|
|
384
|
+
} else if (self.dim.symbols[row-1] && self.dim.symbols[row-1][col] && self.dim.symbols[row-1][col].x) { // row before
|
|
385
|
+
mlen = self.dim.symbols[row-1][col].x;
|
|
386
|
+
} else if (self.dim.symbols[row] && self.dim.symbols[row][col-1] && self.dim.symbols[row][col-1].x) { // column before
|
|
387
|
+
for (let i=row; i<self.dim.symbols.length; i++) {
|
|
388
|
+
if (self.dim.symbols[i][col-1] && mlen < self.dim.symbols[i][col-1].x + self.dim.symbols[i][col-1].width) {
|
|
389
|
+
mlen = self.dim.symbols[i][col-1].x + self.dim.symbols[i][col-1].width;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
} else if (self.dim.symbols[row+1] && self.dim.symbols[row+1][col] && self.dim.symbols[row+1][col].x) { // directly below
|
|
393
|
+
mlen = self.dim.symbols[row+1][col].x;
|
|
394
|
+
} else if (self.dim.symbols[row-1] && self.dim.symbols[row-1][col-1] && self.dim.symbols[row-1][col-1].x) { // diagonal left above
|
|
395
|
+
mlen = self.dim.symbols[row-1][col-1].x + self.dim.symbols[row-1][col-1].width;
|
|
396
|
+
} else { // same column below
|
|
397
|
+
for (let i=row; i<self.dim.symbols.length; i++) {
|
|
398
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][col] && mlen < self.dim.symbols[i][col].x + self.dim.symbols[i][col].width) {
|
|
399
|
+
mlen = self.dim.symbols[i][col].x;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
// found nothing in the rows below
|
|
403
|
+
if (mlen == 0) { // mostly for column 0
|
|
404
|
+
mlen = self.width;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
// console.log(deb,row,col,'--> ' + mlen,debug_dim());
|
|
408
|
+
return mlen;
|
|
409
|
+
} //}}}
|
|
410
|
+
var get_x_plus = this.dim.get_x_plus = function(rowf,rowt,col,deb='') { //{{{
|
|
411
|
+
if (rowf<0) { row = 0 };
|
|
412
|
+
|
|
413
|
+
mlen = 0;
|
|
414
|
+
for (let i=rowf; i<=rowt; i++) {
|
|
415
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][col] && mlen < self.dim.symbols[i][col].x + self.dim.symbols[i][col].width) {
|
|
416
|
+
mlen = self.dim.symbols[i][col].x + self.dim.symbols[i][col].width;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
// console.log(deb,rowf,rowt,col,'--> ' + mlen,debug_dim());
|
|
420
|
+
return mlen;
|
|
421
|
+
} //}}}
|
|
422
|
+
var get_x_width = this.dim.get_x_width = function(maxcol) { //{{{
|
|
423
|
+
let cwidth = 0;
|
|
424
|
+
for (let i=0; i < self.dim.symbols.length; i++) {
|
|
425
|
+
let lwidth = 0;
|
|
426
|
+
for (let j=0; j <= maxcol; j++) {
|
|
427
|
+
if (typeof self.dim.symbols[i] !== 'undefined' && typeof self.dim.symbols[i][j] !== 'undefined') {
|
|
428
|
+
lwidth += self.dim.symbols[i][j].width;
|
|
429
|
+
} else {
|
|
430
|
+
// go up the column and find the next valid value
|
|
431
|
+
let x = i;
|
|
432
|
+
let found = false;
|
|
433
|
+
while (x > 0 && !found) {
|
|
434
|
+
x -= 1;
|
|
435
|
+
if (typeof self.dim.symbols[x] !== 'undefined' && typeof self.dim.symbols[x][j] !== 'undefined') {
|
|
436
|
+
lwidth += self.dim.symbols[x][j].width;
|
|
437
|
+
found = true;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
if (!found) {
|
|
441
|
+
lwidth[i] += self.width;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
if (cwidth < lwidth) { cwidth = lwidth; }
|
|
446
|
+
}
|
|
447
|
+
return cwidth;
|
|
448
|
+
} //}}}
|
|
449
|
+
|
|
450
|
+
var get_y = this.draw.get_y = function(row) { // {{{
|
|
266
451
|
return { y: row * self.height - self.height, height_shift: self.height_shift};
|
|
267
452
|
} // }}}
|
|
268
453
|
|
|
454
|
+
var get_width = this.draw.get_width = function(g) { //{{{
|
|
455
|
+
let t = g.clone();
|
|
456
|
+
self.svg.container.append(t);
|
|
457
|
+
let bb = t[0].getBBox();
|
|
458
|
+
let w = bb.width - bb.x;
|
|
459
|
+
t.remove();
|
|
460
|
+
return w;
|
|
461
|
+
} //}}}
|
|
462
|
+
var get_height = this.draw.get_height = function(g) { //{{{
|
|
463
|
+
let t = g.clone();
|
|
464
|
+
self.svg.container.append(t);
|
|
465
|
+
let bb = t[0].getBBox();
|
|
466
|
+
let h = bb.height - bb.y;
|
|
467
|
+
t.remove();
|
|
468
|
+
return h;
|
|
469
|
+
} //}}}
|
|
470
|
+
var get_dim = this.draw.get_dim = function(g) { //{{{
|
|
471
|
+
let element = g.clone();
|
|
472
|
+
self.svg.container.append(element);
|
|
473
|
+
let svg = element[0].ownerSVGElement;
|
|
474
|
+
|
|
475
|
+
var r = element[0].getBBox();
|
|
476
|
+
|
|
477
|
+
if (!svg) {
|
|
478
|
+
element[0].remove();
|
|
479
|
+
return { x: 0, y: 0, cx: 0, cy: 0, width: 0, height: 0 };
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
var p = svg.createSVGPoint();
|
|
483
|
+
|
|
484
|
+
var matrix = svg.getScreenCTM().inverse().multiply(element[0].getScreenCTM());
|
|
485
|
+
|
|
486
|
+
p.x = r.x;
|
|
487
|
+
p.y = r.y;
|
|
488
|
+
var a = p.matrixTransform(matrix);
|
|
489
|
+
|
|
490
|
+
p.x = r.x + r.width;
|
|
491
|
+
p.y = r.y;
|
|
492
|
+
var b = p.matrixTransform(matrix);
|
|
493
|
+
|
|
494
|
+
p.x = r.x + r.width;
|
|
495
|
+
p.y = r.y + r.height;
|
|
496
|
+
var c = p.matrixTransform(matrix);
|
|
497
|
+
|
|
498
|
+
p.x = r.x;
|
|
499
|
+
p.y = r.y + r.height;
|
|
500
|
+
var d = p.matrixTransform(matrix);
|
|
501
|
+
|
|
502
|
+
var minX = Math.min(a.x, b.x, c.x, d.x);
|
|
503
|
+
var maxX = Math.max(a.x, b.x, c.x, d.x);
|
|
504
|
+
var minY = Math.min(a.y, b.y, c.y, d.y);
|
|
505
|
+
var maxY = Math.max(a.y, b.y, c.y, d.y);
|
|
506
|
+
|
|
507
|
+
var width = maxX - minX;
|
|
508
|
+
var height = maxY - minY;
|
|
509
|
+
|
|
510
|
+
element.remove();
|
|
511
|
+
|
|
512
|
+
return {
|
|
513
|
+
x: minX,
|
|
514
|
+
y: minY,
|
|
515
|
+
width: width,
|
|
516
|
+
height: height,
|
|
517
|
+
cx: minX + width / 2,
|
|
518
|
+
cy: minY + height / 2
|
|
519
|
+
};
|
|
520
|
+
} //}}}
|
|
521
|
+
|
|
522
|
+
var bind_event = this.draw.bind_event = function(sym,tname,context) { //{{{
|
|
523
|
+
for(event_name in adaptor.elements[tname]) {
|
|
524
|
+
sym.bind(event_name, {'function_call':adaptor.elements[tname][event_name]}, function(e) { e.data.function_call($(this).attr('element-id'),e)});
|
|
525
|
+
if(event_name == 'mousedown') sym.bind('contextmenu', false);
|
|
526
|
+
}
|
|
527
|
+
} //}}}
|
|
528
|
+
|
|
269
529
|
var draw_stripe = this.draw.draw_stripe = function (row, maxcol) { // {{{
|
|
270
530
|
if (maxcol < 1) maxcol = 1;
|
|
271
|
-
|
|
531
|
+
|
|
532
|
+
let cwidth = get_x_width(maxcol);
|
|
533
|
+
cwidth = cwidth + 2 * self.width - self.width_shift;
|
|
534
|
+
|
|
535
|
+
var g = $X('<rect element-row="' + row + '" class="stripe ' + (row % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + String(row*self.height+self.height_shift/2) + '" width="' + cwidth + '" height="' + (self.height) + '" xmlns="http://www.w3.org/2000/svg"></rect>');
|
|
272
536
|
self.svg.container.prepend(g);
|
|
273
537
|
return g;
|
|
274
538
|
} // }}}
|
|
275
|
-
|
|
276
|
-
var draw_symbol = this.draw.draw_symbol = function (sname, id, title, row, col, group, addition) { // {{{
|
|
539
|
+
var draw_symbol = this.draw.draw_symbol = function(sname, id, title, parent_row, max_row, row, col, group, addition, info, style) { // {{{
|
|
277
540
|
if(self.elements[sname] == undefined || self.elements[sname].svg == undefined) sname = 'unknown';
|
|
278
541
|
let center_x = (self.width - self.default_width) / 2;
|
|
279
542
|
let center_y = (self.height - self.default_height) / 2;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
'</g>');
|
|
543
|
+
|
|
544
|
+
let dstart = get_x(parent_row,col,'symbol ' + sname);
|
|
545
|
+
|
|
546
|
+
let sstart = dstart + center_x - self.width_shift;
|
|
547
|
+
let stop = row * self.height + center_y - (self.height-self.height_shift);
|
|
548
|
+
|
|
549
|
+
var g = $X('<g class="element" element-row="' + (row-1) + '" element-type="' + sname + '" element-id="' + id + '" xmlns="http://www.w3.org/2000/svg">' +
|
|
550
|
+
'<g transform="translate(' + String(sstart) + ',' + String(stop) + ')"></g>' +
|
|
551
|
+
'</g>');
|
|
552
|
+
|
|
553
|
+
// add the element-endpoint and other stuff to each symbol (from theme info function)
|
|
554
|
+
for (const key in info) {
|
|
555
|
+
g.attr(key, info[key]);
|
|
294
556
|
}
|
|
557
|
+
|
|
295
558
|
var sym = self.svg.defs[sname].clone();
|
|
559
|
+
var subtype = undefined;
|
|
560
|
+
|
|
561
|
+
if (g.attr('element-endpoint')) {
|
|
562
|
+
let tsym = self.get_symbol(g.attr('element-endpoint'));
|
|
563
|
+
if (tsym) {
|
|
564
|
+
let found = false;
|
|
565
|
+
$('.part-end',sym).remove();
|
|
566
|
+
if ($('.part-end',tsym).length > 0) {
|
|
567
|
+
sym.prepend($('.part-end',tsym).clone());
|
|
568
|
+
found = true;
|
|
569
|
+
}
|
|
570
|
+
if ($('.part-middle',tsym).length > 0) {
|
|
571
|
+
$('.part-middle',sym).remove();
|
|
572
|
+
sym.prepend($('.part-middle',tsym).clone());
|
|
573
|
+
found = true;
|
|
574
|
+
}
|
|
575
|
+
if ($('.part-start',tsym).length > 0) {
|
|
576
|
+
$('.part-start',sym).remove();
|
|
577
|
+
sym.prepend($('.part-start',tsym).clone());
|
|
578
|
+
found = true;
|
|
579
|
+
}
|
|
580
|
+
if ($('.part-normal',tsym).length > 0) {
|
|
581
|
+
$('.part-normal',sym).remove();
|
|
582
|
+
sym.prepend($('.part-normal',tsym).clone());
|
|
583
|
+
found = true;
|
|
584
|
+
}
|
|
585
|
+
if (!found) {
|
|
586
|
+
$('.part-normal',sym).remove();
|
|
587
|
+
let ts = $X('<g class="part-normal" xmlns="http://www.w3.org/2000/svg"></g>');
|
|
588
|
+
ts.append($(tsym.documentElement.children).clone());
|
|
589
|
+
sym.prepend(ts);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
let tprop = self.get_properties(g.attr('element-endpoint'));
|
|
593
|
+
if (tprop) {
|
|
594
|
+
subtype = tprop.subtype;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
296
598
|
var tit = $X('<title xmlns="http://www.w3.org/2000/svg"></title>');
|
|
297
599
|
tit.text(title);
|
|
298
600
|
sym.prepend(tit);
|
|
601
|
+
let lab = $('.label',sym);
|
|
602
|
+
if (lab.length > 0 && self.compact) {
|
|
603
|
+
let l_maxlen = 40; // max label size
|
|
604
|
+
let l_split = 18; // desired split position
|
|
605
|
+
let l_dev = 10; // if one split line is bigger than l_split + l_dev, split was not successfull and we have to display a more truncated string
|
|
606
|
+
let l_trunc = 18; // trucation size
|
|
607
|
+
|
|
608
|
+
let sta = $('.part-start',sym);
|
|
609
|
+
let mid = $('.part-middle',sym);
|
|
610
|
+
let end = $('.part-end',sym);
|
|
611
|
+
let xtr = $('.part-extra',sym);
|
|
612
|
+
let nor = $('.part-normal',sym);
|
|
613
|
+
if (title && title != '') {
|
|
614
|
+
if (title.length < l_split) {
|
|
615
|
+
lab.text(title);
|
|
616
|
+
} else {
|
|
617
|
+
if (title.length > l_maxlen) { title = title.substr(0,l_maxlen) + '\u2026'; }
|
|
618
|
+
if (title.includes(' ')) {
|
|
619
|
+
let len = title.length;
|
|
620
|
+
let pos = -2;
|
|
621
|
+
let seps = []
|
|
622
|
+
while (pos != -1) {
|
|
623
|
+
pos = title.indexOf(' ',pos+1);
|
|
624
|
+
if (pos > -1) seps.push(pos);
|
|
625
|
+
}
|
|
626
|
+
let closest = title.length;
|
|
627
|
+
let it = 0;
|
|
628
|
+
seps.forEach((ele) => {
|
|
629
|
+
let min = Math.abs(title.length/2 - ele);
|
|
630
|
+
if (min < closest) { closest = min; it = ele; }
|
|
631
|
+
});
|
|
632
|
+
let l1 = title.substr(0,it);
|
|
633
|
+
let l2 = title.substr(it+1);
|
|
634
|
+
if (l1.length > l_split+l_dev) {
|
|
635
|
+
title = title.substr(0,l_trunc) + '\u2026';
|
|
636
|
+
lab.text(title);
|
|
637
|
+
} else {
|
|
638
|
+
if (l2.length > l_split) { l2 = l2.substr(0,l_trunc) + '\u2026'; }
|
|
639
|
+
let a1 = $X('<tspan x="0" dy="-8" xmlns="http://www.w3.org/2000/svg"></tspan>');
|
|
640
|
+
a1.text(l1);
|
|
641
|
+
let a2 = $X('<tspan x="0" dy="12" xmlns="http://www.w3.org/2000/svg"></tspan>');
|
|
642
|
+
a2.text(l2);
|
|
643
|
+
lab.append(a1);
|
|
644
|
+
lab.append(a2);
|
|
645
|
+
}
|
|
646
|
+
} else {
|
|
647
|
+
if (title.length > l_split) { title = title.substr(0,l_trunc) + '\u2026'; }
|
|
648
|
+
lab.text(title);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
let width = this.get_width(lab);
|
|
652
|
+
if (mid.length > 0) {
|
|
653
|
+
if (end.length > 0) {
|
|
654
|
+
let pos = get_dim(mid);
|
|
655
|
+
mid.attr('clip-path','url(#ele-' + id + ')');
|
|
656
|
+
let clip = $X('<clipPath belongs-to="element" id="ele-' + id + '" xmlns="http://www.w3.org/2000/svg">' +
|
|
657
|
+
'<rect x="0" y="-1" width="' + width + '" height="' + (pos.y + pos.height + 4) + '"></rect>' +
|
|
658
|
+
'</clipPath>');
|
|
659
|
+
$('defs',self.svg.container).append(clip);
|
|
660
|
+
|
|
661
|
+
end.attr('transform','translate(' + (pos.x + width - self.endclipshift - 4) + ',0)');
|
|
662
|
+
if (xtr.length > 0) {
|
|
663
|
+
xtr.attr('transform','translate(' + (pos.x + width - self.endclipshift - 4) + ',0)');
|
|
664
|
+
}
|
|
665
|
+
set_x_cond(row,col,dstart,pos.x + width - self.endclipshift - 4 + this.get_width(end) + 2 * self.width_shift_label,sname,title,subtype);
|
|
666
|
+
} else {
|
|
667
|
+
let tdim = 0;
|
|
668
|
+
if (self.rotated_labels && self.elements[sname].rotatelabels != false) {
|
|
669
|
+
lab.addClass('rotate');
|
|
670
|
+
tdim = self.width;
|
|
671
|
+
} else {
|
|
672
|
+
tdim = self.width + width + self.width_shift_label;
|
|
673
|
+
}
|
|
674
|
+
set_x_cond(row,col,dstart,tdim,sname,title,subtype);
|
|
675
|
+
}
|
|
676
|
+
} else {
|
|
677
|
+
set_x_cond(row,col,dstart,self.width,sname,title,subtype);
|
|
678
|
+
}
|
|
679
|
+
if (nor.length > 0) { nor.remove(); }
|
|
680
|
+
} else {
|
|
681
|
+
set_x_cond(row,col,dstart,self.width,sname,title,subtype);
|
|
682
|
+
if (sta.length > 0) { sta.remove(); }
|
|
683
|
+
if (mid.length > 0) { mid.remove(); }
|
|
684
|
+
if (end.length > 0) { end.remove(); }
|
|
685
|
+
}
|
|
686
|
+
} else {
|
|
687
|
+
$('.part-start',sym).remove();
|
|
688
|
+
$('.part-middle',sym).remove();
|
|
689
|
+
$('.part-end',sym).remove();
|
|
690
|
+
set_x_cond(row,col,dstart,self.width,sname,title,subtype);
|
|
691
|
+
}
|
|
692
|
+
|
|
299
693
|
sym.attr('class','activities');
|
|
694
|
+
let sty = { ...self.global_style, ...style };
|
|
695
|
+
for (const s in sty) {
|
|
696
|
+
$('.colorstyle', sym).each((_,ele) => {
|
|
697
|
+
$(ele).css(s,sty[s]);
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
|
|
300
701
|
$(g[0].childNodes[0]).append(sym);
|
|
702
|
+
if (!addition) {
|
|
703
|
+
// TODO change to better respresent exec
|
|
704
|
+
$(g[0].childNodes[0]).append(
|
|
705
|
+
$X('<text class="super" transform="translate(20,-2)" xmlns="http://www.w3.org/2000/svg">' +
|
|
706
|
+
'<tspan class="exec">▶</tspan>' +
|
|
707
|
+
'<tspan class="active">0</tspan>' +
|
|
708
|
+
'<tspan class="colon">,</tspan>' +
|
|
709
|
+
'<tspan class="vote">0</tspan>' +
|
|
710
|
+
'</text>')
|
|
711
|
+
);
|
|
712
|
+
}
|
|
301
713
|
|
|
302
714
|
// Binding events for symbol
|
|
303
715
|
bind_event(g,sname,true);
|
|
304
716
|
|
|
305
|
-
if(group) {group.append(g);}
|
|
717
|
+
if (group) {group.append(g);}
|
|
306
718
|
else {self.svg.container.children('g:first').append(g);}
|
|
719
|
+
|
|
307
720
|
return g;
|
|
308
721
|
} // }}}
|
|
309
|
-
var bind_event = this.draw.bind_event = function(sym,tname,context) { //{{{
|
|
310
|
-
for(event_name in adaptor.elements[tname]) {
|
|
311
|
-
sym.bind(event_name, {'function_call':adaptor.elements[tname][event_name]}, function(e) { e.data.function_call($(this).attr('element-id'),e)});
|
|
312
|
-
if(event_name == 'mousedown') sym.bind('contextmenu', false);
|
|
313
|
-
}
|
|
314
|
-
} //}}}
|
|
315
722
|
var draw_border = this.draw.draw_border = function(id, p1, p2, group) { // {{{
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
'
|
|
320
|
-
'
|
|
723
|
+
let bstart = get_x(p1.row,p1.col,'border from');
|
|
724
|
+
let bend = get_x_plus(p1.row,p2.row,p2.col,'border to');
|
|
725
|
+
group.prepend($X('<rect element-id="' + id + '" x="' + (bstart - 1.1 * self.width_shift - self.group_extend) + '" ' +
|
|
726
|
+
'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend) + '" ' +
|
|
727
|
+
'width="' + (bend-bstart+2*self.group_extend) + '" ' +
|
|
728
|
+
'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend) + '" ' +
|
|
729
|
+
'class="block" rx="12" ry="12" xmlns="http://www.w3.org/2000/svg"/>'));
|
|
321
730
|
} // }}}
|
|
322
731
|
var draw_tile = this.draw.draw_tile = function(id, p1, p2, group) { // {{{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
'
|
|
327
|
-
'
|
|
732
|
+
let bstart = get_x(p1.row,p1.col,'tile from');
|
|
733
|
+
let bend = get_x_plus(p1.row,p2.row,p2.col,'tile to');
|
|
734
|
+
group.prepend($X('<rect element-id="' + id + '" x="' + (bstart - 1.1 * self.width_shift - self.group_extend) + '" ' +
|
|
735
|
+
'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend) + '" ' +
|
|
736
|
+
'width="' + (bend-bstart+2*self.group_extend) + '" ' +
|
|
737
|
+
'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend) + '" ' +
|
|
738
|
+
'class="tile" rx="12" ry="12" xmlns="http://www.w3.org/2000/svg"/>'));
|
|
328
739
|
} // }}}
|
|
329
|
-
var draw_connection = this.draw.draw_connection = function(group, start, end,
|
|
740
|
+
var draw_connection = this.draw.draw_connection = function(group, start, end, context_row, arrow) { // {{{
|
|
741
|
+
let sr = Math.min(start.row,end.row);
|
|
742
|
+
let cstart = get_x(sr,start.col,'conn from');
|
|
743
|
+
let cend = get_x(sr,end.col,'conn to');
|
|
744
|
+
self.dim.connections.push({from: {row: start.row, col: start.col}, to: {row: end.row, col: end.col}});
|
|
745
|
+
|
|
330
746
|
if(((end['row']-start['row']) == 0) && ((end['col']-start['col']) == 0)) return;
|
|
331
747
|
var line;
|
|
332
748
|
if (arrow)
|
|
333
|
-
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="
|
|
749
|
+
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge" marker-end="url(#arrow)"/>');
|
|
334
750
|
else
|
|
335
|
-
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="
|
|
751
|
+
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge"/>');
|
|
336
752
|
if (end['row']-start['row'] == 0 || end['col']-start['col'] == 0) { // straight line
|
|
337
|
-
line.attr("d", "M " + String(
|
|
338
|
-
|
|
753
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
754
|
+
String(cend) + "," + String(end['row']*self.height-15)
|
|
339
755
|
);
|
|
340
756
|
} else if (end['row']-start['row'] > 0) { // downwards
|
|
341
757
|
if (end['col']-start['col'] > 0) {// left - right
|
|
342
758
|
if (self.compact) {
|
|
343
|
-
line.attr("d", "M " + String(
|
|
344
|
-
String(
|
|
345
|
-
String(
|
|
346
|
-
String(
|
|
759
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
760
|
+
String(cstart+14) + "," + String((end['row']-1)*self.height) +" "+ // first turn of horizontal-line going away from node
|
|
761
|
+
String(cend) + "," + String((end['row']-1)*self.height) +" "+
|
|
762
|
+
String(cend) + "," + String(end['row']*self.height-15)
|
|
347
763
|
);
|
|
348
764
|
} else {
|
|
349
|
-
line.attr("d", "M " + String(
|
|
350
|
-
String(
|
|
351
|
-
String(
|
|
765
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
766
|
+
String(cend) + "," + String(start['row']*self.height-15) +" "+
|
|
767
|
+
String(cend) + "," + String(end['row']*self.height-15)
|
|
352
768
|
);
|
|
353
769
|
}
|
|
354
770
|
} else { // right - left
|
|
355
|
-
line.attr("d", "M " + String(
|
|
356
|
-
String(
|
|
357
|
-
String(
|
|
358
|
-
String(
|
|
771
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
772
|
+
String(cstart) + "," + String(end['row']*self.height-32) +" "+
|
|
773
|
+
String(cend+14) + "," + String(end['row']*self.height-32) +" "+ // last turn of horizontal-line going into the node
|
|
774
|
+
String(cend) + "," + String(end['row']*self.height-15)
|
|
359
775
|
);
|
|
360
776
|
}
|
|
361
777
|
} else if(end['row']-start['row'] < 0) { // upwards
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
);
|
|
369
|
-
} else {
|
|
370
|
-
line.attr("d", "M " + String(start['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
|
371
|
-
String(end['col']*self.width+15) + "," + String(start['row']*self.height-15) +" "+
|
|
372
|
-
String(end['col']*self.width+15) + "," + String(end['row']*self.height+15)+" "+
|
|
373
|
-
String(end['col']*self.width) + "," + String(end['row']*self.height-15)
|
|
374
|
-
);
|
|
375
|
-
}
|
|
778
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
779
|
+
String(cstart) + "," + String((self.dim.symbols.length-1)*self.height+4) +" "+
|
|
780
|
+
String(cend+15) + "," + String((self.dim.symbols.length-1)*self.height+4) +" "+
|
|
781
|
+
String(cend+15) + "," + String(end['row']*self.height+15)+" "+
|
|
782
|
+
String(cend) + "," + String(end['row']*self.height-15)
|
|
783
|
+
);
|
|
376
784
|
}
|
|
377
785
|
self.svg.container.append(line);
|
|
378
786
|
} // }}}
|
|
379
787
|
// }}}
|
|
788
|
+
|
|
380
789
|
// Initialize {{{
|
|
381
|
-
|
|
790
|
+
adaptor = wf_adaptor;
|
|
382
791
|
// }}}
|
|
792
|
+
|
|
383
793
|
} // }}}
|
|
384
794
|
|
|
385
795
|
// WfDescription:
|
|
@@ -404,11 +814,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
404
814
|
illustrator.draw.draw_stripe(i,graph.max.col);
|
|
405
815
|
}
|
|
406
816
|
}
|
|
407
|
-
|
|
408
|
-
adaptor.draw_labels(graph.max,labels,{ 'height': illustrator.height, 'height_shift': illustrator.height_shift },illustrator.striped == true ? true : false);
|
|
409
|
-
} else {
|
|
410
|
-
adaptor.draw_labels(graph.max,[],{ 'height': illustrator.height, 'height_shift': illustrator.height_shift },false);
|
|
411
|
-
}
|
|
817
|
+
adaptor.draw_labels(graph.max,labels,{ 'height': illustrator.height, 'stripe_height': illustrator.default_height, 'height_shift': illustrator.height_shift },illustrator.striped == true ? true : false);
|
|
412
818
|
} //}}}
|
|
413
819
|
|
|
414
820
|
// Generic Functions {{{
|
|
@@ -424,11 +830,12 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
424
830
|
}
|
|
425
831
|
id_counter = {};
|
|
426
832
|
labels = [];
|
|
833
|
+
let start = performance.now();
|
|
427
834
|
illustrator.clear();
|
|
428
|
-
var graph = parse(description.children('description').get(0), {'row':0,'col':0,
|
|
835
|
+
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
|
|
429
836
|
illustrator.set_svg(graph);
|
|
430
|
-
// set labels
|
|
431
837
|
self.set_labels(graph);
|
|
838
|
+
illustrator.set_duration(start);
|
|
432
839
|
} // }}}
|
|
433
840
|
var gd = this.get_description = function() { // public {{{
|
|
434
841
|
var serxml = $(description.get(0).documentElement).clone(true);
|
|
@@ -476,21 +883,24 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
476
883
|
var refresh = this.refresh = function(doit) {
|
|
477
884
|
id_counter = {};
|
|
478
885
|
labels = [];
|
|
886
|
+
let start = performance.now();
|
|
479
887
|
illustrator.clear();
|
|
480
|
-
var graph = parse(description.children('description').get(0), {'row':0,'col':0
|
|
888
|
+
var graph = parse(description.children('description').get(0), {'row':0,'col':0});
|
|
481
889
|
illustrator.set_svg(graph);
|
|
482
|
-
// set labels
|
|
483
890
|
self.set_labels(graph);
|
|
891
|
+
illustrator.set_duration(start);
|
|
484
892
|
doit(self);
|
|
485
893
|
}
|
|
486
894
|
var update = this.update = function(svgid) { // {{{
|
|
487
895
|
id_counter = {};
|
|
488
896
|
if(update_illustrator){
|
|
897
|
+
let start = performance.now();
|
|
489
898
|
labels = [];
|
|
490
899
|
illustrator.clear();
|
|
491
|
-
var graph = parse(description.children('description').get(0), {'row':0,'col':0
|
|
900
|
+
var graph = parse(description.children('description').get(0), {'row':0,'col':0});
|
|
492
901
|
illustrator.set_svg(graph);
|
|
493
902
|
self.set_labels(graph);
|
|
903
|
+
illustrator.set_duration(start);
|
|
494
904
|
}
|
|
495
905
|
|
|
496
906
|
var newn = $('*[new=true]',description);
|
|
@@ -567,15 +977,13 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
567
977
|
// }}}
|
|
568
978
|
// Helper Functions {{{
|
|
569
979
|
var parse = function(root, parent_pos) { // private {{{
|
|
570
|
-
var pos =
|
|
980
|
+
var pos = JSON.parse(JSON.stringify(parent_pos));
|
|
571
981
|
var max = {'row': 0,'col': 0};
|
|
572
982
|
var prev = [parent_pos]; // connects parent with child(s), depending on the expansion
|
|
573
983
|
var endnodes = [];
|
|
574
984
|
var sname = sym_name(root.tagName,root);
|
|
575
985
|
var root_expansion = illustrator.elements[root.tagName].expansion(root);
|
|
576
|
-
var block = {'max':
|
|
577
|
-
|
|
578
|
-
var group = $X('<g class="group" xmlns="http://www.w3.org/2000/svg"/>');
|
|
986
|
+
var block = { 'max': {'row': pos.row, 'col': pos.col}, 'endnodes': [], 'svg': $X('<g class="group" xmlns="http://www.w3.org/2000/svg"/>') };
|
|
579
987
|
|
|
580
988
|
if(root_expansion == 'horizontal') pos.row++;
|
|
581
989
|
if(illustrator.elements[root.tagName].col_shift(root) == true && root_expansion != 'horizontal') pos.col++;
|
|
@@ -585,12 +993,13 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
585
993
|
$(root).attr('svg-id','description');
|
|
586
994
|
$(root).attr('svg-type','description');
|
|
587
995
|
$(root).attr('svg-subtype','description');
|
|
588
|
-
|
|
996
|
+
block.svg.attr('element-id','group-description');
|
|
589
997
|
if (illustrator.elements[sname].label) {
|
|
590
998
|
// javascript object spread syntax is my new weird crush - the JS designers must be serious people
|
|
591
999
|
labels.push({...{row: pos.row, element_id: 'start', tname: 'start', label: illustrator.elements[sname].label(root)},...illustrator.draw.get_y(pos.row)});
|
|
592
1000
|
}
|
|
593
|
-
illustrator.
|
|
1001
|
+
illustrator.global_style = (illustrator.elements[sname].style && root) ? illustrator.elements[sname].style(root) : {};
|
|
1002
|
+
illustrator.draw.draw_symbol(sname, 'description', 'START', pos.row, pos.row, pos.row, pos.col, block.svg, false, {}, {})
|
|
594
1003
|
} // }}}
|
|
595
1004
|
|
|
596
1005
|
$(root).children().filter(function(){ return this.localName[0] != '_'; }).each(function() {
|
|
@@ -599,13 +1008,19 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
599
1008
|
var sname = sym_name(tname,context);
|
|
600
1009
|
pos.final = illustrator.elements[sname].final ? true : false;
|
|
601
1010
|
pos.wide = illustrator.elements[sname].wide ? true : false;
|
|
1011
|
+
pos.noindent = illustrator.elements[sname].noindent ? true : false;
|
|
602
1012
|
|
|
603
1013
|
// Calculate next position {{{
|
|
604
|
-
if(root_expansion == 'vertical')
|
|
1014
|
+
if(root_expansion == 'vertical') { pos.row++; }
|
|
605
1015
|
if(root_expansion == 'horizontal') {
|
|
606
|
-
|
|
1016
|
+
// for noindent themes do not indent the first column
|
|
1017
|
+
if (!pos.noindent || (pos.noindent && endnodes.length > 1)) {
|
|
1018
|
+
illustrator.dim.set_x(pos.row,pos.col,illustrator.width,sname);
|
|
1019
|
+
pos.col++;
|
|
1020
|
+
}
|
|
607
1021
|
if (!illustrator.compact) {
|
|
608
1022
|
if (block.max.row) {
|
|
1023
|
+
illustrator.dim.set_x(pos.row,pos.col,illustrator.width,sname);
|
|
609
1024
|
pos.row = block.max.row + 1;
|
|
610
1025
|
}
|
|
611
1026
|
}
|
|
@@ -614,8 +1029,22 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
614
1029
|
if(illustrator.elements[tname] != undefined && illustrator.elements[tname].type == 'complex') {
|
|
615
1030
|
if(illustrator.elements[tname] != undefined && !illustrator.elements[tname].svg) pos.row--;
|
|
616
1031
|
// TODO: Remaining problem is the order inside the svg. Thats why the connection is above the icon
|
|
617
|
-
|
|
618
|
-
|
|
1032
|
+
|
|
1033
|
+
illustrator.dim.set_x(pos.row,pos.col,illustrator.width,sname);
|
|
1034
|
+
// but fuuuuu, we calculate the gateways only later, so we couldnt even have them bigger for now
|
|
1035
|
+
|
|
1036
|
+
// console.log('----> down', tname, parent_pos.row, pos.row, parent_pos.col, pos.col, illustrator.dim.debug());
|
|
1037
|
+
|
|
1038
|
+
let tblock = parse(context, JSON.parse(JSON.stringify(pos)));
|
|
1039
|
+
|
|
1040
|
+
// merge block and tblock, enforce the max, as the second branch could have fewer nodes than the first
|
|
1041
|
+
block.max.row = Math.max(block.max.row,tblock.max.row);
|
|
1042
|
+
block.max.col = Math.max(block.max.col,tblock.max.col);
|
|
1043
|
+
block.endnodes = tblock.endnodes;
|
|
1044
|
+
|
|
1045
|
+
// console.log('<---- up', tname, parent_pos.row, block.max.row, parent_pos.col, block.max.col, illustrator.dim.debug());
|
|
1046
|
+
|
|
1047
|
+
block.svg.append(tblock.svg);
|
|
619
1048
|
block.svg.attr('id', 'group-' + $(context).attr('svg-id'));
|
|
620
1049
|
if(illustrator.elements[sname].endnodes == 'aggregate') endnodes = []; // resets endpoints e.g. potential preceding primitive
|
|
621
1050
|
} else {
|
|
@@ -623,19 +1052,17 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
623
1052
|
block.max.row = pos.row;
|
|
624
1053
|
block.max.col = pos.col;
|
|
625
1054
|
block.endnodes = [pos];
|
|
626
|
-
block.svg = group;
|
|
627
1055
|
}
|
|
628
1056
|
}
|
|
629
1057
|
// }}}
|
|
630
1058
|
|
|
631
1059
|
var g;
|
|
632
1060
|
set_details(tname,sname,pos,context);
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
[g, endnodes] = draw_position(tname,origpos,prev,block,group,endnodes,context);
|
|
1061
|
+
var origpos = JSON.parse(JSON.stringify(pos));
|
|
1062
|
+
[g, endnodes] = draw_position(tname,parent_pos,origpos,prev,block,endnodes,context);
|
|
636
1063
|
|
|
637
1064
|
// Prepare next iteration {{{
|
|
638
|
-
if(root_expansion == 'vertical') { prev =
|
|
1065
|
+
if(root_expansion == 'vertical') { prev = JSON.parse(JSON.stringify(endnodes)); pos.row = block.max.row;} // covers e.g. input's for alternative, parallel_branch, ... everything with horizontal expansion
|
|
639
1066
|
if(root_expansion == 'horizontal') pos.col = block.max.col;
|
|
640
1067
|
if(max.row < block.max.row) max.row = block.max.row;
|
|
641
1068
|
if(max.col < block.max.col) max.col = block.max.col;
|
|
@@ -653,13 +1080,14 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
653
1080
|
max.col++;
|
|
654
1081
|
block.max.col = pos.col;
|
|
655
1082
|
}
|
|
656
|
-
draw_position(ctname,pos,block.endnodes,block,
|
|
1083
|
+
draw_position(ctname,parent_pos,pos,block.endnodes,block,[],context,{svg: g, pos: origpos});
|
|
657
1084
|
pos.col--;
|
|
1085
|
+
set_details(ctname,csname,pos,context,true);
|
|
658
1086
|
} else {
|
|
659
|
-
|
|
1087
|
+
set_details(ctname,csname,pos,context,true);
|
|
1088
|
+
[undefined, endnodes] = draw_position(ctname,parent_pos,pos,prev,block,[],context,{svg: g, pos: origpos});
|
|
660
1089
|
}
|
|
661
|
-
|
|
662
|
-
prev = $.extend(true, {}, endnodes);
|
|
1090
|
+
prev = JSON.parse(JSON.stringify(endnodes));
|
|
663
1091
|
}
|
|
664
1092
|
});
|
|
665
1093
|
|
|
@@ -672,10 +1100,10 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
672
1100
|
if(root.tagName == 'description' && illustrator.elements[root.tagName].closing_symbol) {
|
|
673
1101
|
pos.row++;
|
|
674
1102
|
max.row = pos.row;
|
|
675
|
-
draw_position(illustrator.elements['start'].closing_symbol,pos,prev,block,
|
|
1103
|
+
draw_position(illustrator.elements['start'].closing_symbol,parent_pos,pos,prev,block,[],this,{svg: block.svg, pos: pos});
|
|
676
1104
|
}
|
|
677
1105
|
|
|
678
|
-
return {'endnodes': endnodes, 'max':max, 'svg':
|
|
1106
|
+
return {'endnodes': endnodes, 'max':max, 'svg': block.svg};
|
|
679
1107
|
} // }}}
|
|
680
1108
|
var sym_name = function(tname,context) { //{{{
|
|
681
1109
|
var sname;
|
|
@@ -697,39 +1125,51 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
697
1125
|
}
|
|
698
1126
|
if (illustrator.elements[sname].label) {
|
|
699
1127
|
var lab = illustrator.elements[sname].label(context);
|
|
700
|
-
if (lab
|
|
701
|
-
|
|
1128
|
+
if (lab) {
|
|
1129
|
+
for (let i=0; i<lab.length; i++) {
|
|
1130
|
+
if (lab[i] && lab[i].value && lab[i].column == 'Label' && lab[i].value != '') {
|
|
1131
|
+
$(context).attr('svg-label', lab[0].value);
|
|
1132
|
+
if (illustrator.compact) {
|
|
1133
|
+
lab.splice(i,1);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
labels.push({...{row: pos.row, element_id: $(context).attr('svg-id'), tname: tname, label: lab},...illustrator.draw.get_y(pos.row)});
|
|
702
1138
|
}
|
|
703
|
-
labels.push({...{row: pos.row, element_id: $(context).attr('svg-id'), tname: tname, label: lab},...illustrator.draw.get_y(pos.row)});
|
|
704
1139
|
}
|
|
705
1140
|
} //}}}
|
|
706
|
-
var draw_position = function(tname,pos,prev,block,
|
|
1141
|
+
var draw_position = function(tname,parent_pos,pos,prev,block,endnodes,context,second) { // private {{{
|
|
707
1142
|
var sname = sym_name(tname,context);
|
|
1143
|
+
// console.log('----- pos ' + sname, parent_pos.row, block.max.row, parent_pos.col, block.max.col, block, illustrator.dim.debug());
|
|
1144
|
+
|
|
708
1145
|
// Draw Symbol {{{
|
|
1146
|
+
let style = {};
|
|
1147
|
+
if (illustrator.elements[sname].style && context) {
|
|
1148
|
+
style = illustrator.elements[sname].style(context);
|
|
1149
|
+
}
|
|
709
1150
|
if (second) {
|
|
710
|
-
|
|
1151
|
+
// wide is only for the special case of variable parallel, only event_end has it, all others should reference the first row
|
|
1152
|
+
illustrator.draw.draw_symbol(sname, $(context).attr('svg-id'), $(context).attr('svg-label'), illustrator.elements[sname].wide == true ? parent_pos.row+1 : parent_pos.row, block.max.row, pos.row, pos.col, second.svg, true, {}, style).addClass(illustrator.elements[sname] ? illustrator.elements[sname].type : 'primitive unknown');
|
|
711
1153
|
} else {
|
|
712
1154
|
$(context).attr('svg-type',tname);
|
|
713
1155
|
$(context).attr('svg-subtype',sname);
|
|
714
1156
|
if((illustrator.elements[sname] && illustrator.elements[sname].svg) || sname == 'unknown') {
|
|
715
|
-
|
|
716
|
-
if (illustrator.elements[sname].info) {
|
|
717
|
-
|
|
718
|
-
_.each(info,function(val,key) {
|
|
719
|
-
g.attr(key, val);
|
|
720
|
-
});
|
|
1157
|
+
let info = {};
|
|
1158
|
+
if (illustrator.elements[sname].info && context) {
|
|
1159
|
+
info = illustrator.elements[sname].info(context);
|
|
721
1160
|
}
|
|
1161
|
+
var g = illustrator.draw.draw_symbol(sname, $(context).attr('svg-id'), $(context).attr('svg-label'), parent_pos.row, block.max.row, pos.row, pos.col, block.svg, false, info, style).addClass(illustrator.elements[sname] ? illustrator.elements[sname].type : 'primitive unknown');
|
|
722
1162
|
} else { console.log("no icon "+ sname);}
|
|
723
|
-
if(illustrator.elements[sname] && illustrator.elements[sname].border) {
|
|
724
|
-
|
|
1163
|
+
if (illustrator.elements[sname] && illustrator.elements[sname].border) {
|
|
1164
|
+
let wide = (illustrator.elements[sname].wide == true && block.max.col == pos.col) ? pos.col + 1 : block.max.col;
|
|
725
1165
|
if (illustrator.elements[sname].closing_symbol) {
|
|
726
1166
|
illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg);
|
|
727
1167
|
} else {
|
|
728
1168
|
illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg);
|
|
729
1169
|
}
|
|
730
1170
|
}
|
|
731
|
-
if(illustrator.elements[sname] && illustrator.elements[sname].type == 'complex') {
|
|
732
|
-
|
|
1171
|
+
if (illustrator.elements[sname] && illustrator.elements[sname].type == 'complex') {
|
|
1172
|
+
let wide = (illustrator.elements[sname].wide == true && block.max.col == pos.col) ? pos.col + 1 : block.max.col;
|
|
733
1173
|
if (illustrator.elements[sname].closing_symbol) {
|
|
734
1174
|
illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg);
|
|
735
1175
|
} else {
|
|
@@ -738,48 +1178,72 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
738
1178
|
}
|
|
739
1179
|
}
|
|
740
1180
|
// }}}
|
|
1181
|
+
|
|
741
1182
|
// Calculate Connection {{{
|
|
1183
|
+
let connection_case = 0;
|
|
742
1184
|
if(illustrator.elements[sname] != undefined && illustrator.elements[sname].closeblock == true) { // Close Block if element e.g. loop
|
|
743
1185
|
if (second) {
|
|
744
1186
|
if (second.pos.row+1 < pos.row) { // when no content, dont paint the up arrow
|
|
745
|
-
|
|
1187
|
+
connection_case = 1;
|
|
1188
|
+
// console.log('++ case 1',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1189
|
+
illustrator.draw.draw_connection(block.svg, pos, second.pos, 0, true);
|
|
746
1190
|
}
|
|
747
1191
|
} else {
|
|
748
|
-
for(node
|
|
749
|
-
if (!block.endnodes[node].final) {
|
|
750
|
-
|
|
1192
|
+
for (let node=0; node < block.endnodes.length; node++) {
|
|
1193
|
+
if (block.endnodes[node] && !block.endnodes[node].final) {
|
|
1194
|
+
connection_case = 2;
|
|
1195
|
+
// console.log('++ case 2',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1196
|
+
illustrator.draw.draw_connection(block.svg, block.endnodes[node], pos, 0, true);
|
|
751
1197
|
}
|
|
752
1198
|
}
|
|
753
1199
|
}
|
|
754
1200
|
}
|
|
755
1201
|
if(illustrator.elements[sname] != undefined && illustrator.elements[sname].endnodes != 'this') {
|
|
756
1202
|
for(i in block.endnodes) { endnodes.push(block.endnodes[i]); } // collects all endpoints from different childs e.g. alternatives from choose
|
|
757
|
-
} else { endnodes = [
|
|
1203
|
+
} else { endnodes = [JSON.parse(JSON.stringify(pos))]; } // sets this element as only endpoint (aggregate)
|
|
758
1204
|
if(prev[0].row == 0 || prev[0].col == 0) { // this enforces the connection from description to the first element
|
|
759
|
-
|
|
1205
|
+
connection_case = 3;
|
|
1206
|
+
illustrator.draw.draw_connection(block.svg, { row: 1, col: 1 }, pos, 0, true);
|
|
760
1207
|
} else {
|
|
761
1208
|
if (illustrator.elements[sname].noarrow == undefined || illustrator.elements[sname].noarrow == false) {
|
|
762
|
-
for (node
|
|
763
|
-
if (!prev[node].final) {
|
|
1209
|
+
for (let node=0; node < prev.length; node++) {
|
|
1210
|
+
if (prev[node] && !prev[node].final) {
|
|
764
1211
|
if (prev[node].wide) {
|
|
765
|
-
var pn =
|
|
1212
|
+
var pn = JSON.parse(JSON.stringify(prev[node]));
|
|
766
1213
|
if (pos.col > prev[node].col) {
|
|
767
1214
|
pn.col = pos.col;
|
|
768
1215
|
}
|
|
769
|
-
|
|
1216
|
+
connection_case = 4;
|
|
1217
|
+
// console.log('++ case 4',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1218
|
+
illustrator.draw.draw_connection(block.svg, pn, pos, 0, true);
|
|
770
1219
|
} else {
|
|
771
|
-
|
|
1220
|
+
connection_case = 5;
|
|
1221
|
+
if (prev.length == 1) {
|
|
1222
|
+
// console.log('++ case 5a',parent_pos.row, '---', prev[node].row,pos.row,illustrator.dim.debug());
|
|
1223
|
+
illustrator.draw.draw_connection(block.svg, prev[node], pos, 0, true);
|
|
1224
|
+
} else {
|
|
1225
|
+
// console.log('++ case 5b',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1226
|
+
illustrator.draw.draw_connection(block.svg, prev[node], pos, 0, true);
|
|
1227
|
+
}
|
|
772
1228
|
}
|
|
773
1229
|
}
|
|
774
1230
|
}
|
|
775
1231
|
} else {
|
|
776
|
-
for(node
|
|
777
|
-
if (!prev[node].final)
|
|
778
|
-
|
|
1232
|
+
for (let node=0; node < prev.length; node++) {
|
|
1233
|
+
if (prev[node] && !prev[node].final) {
|
|
1234
|
+
connection_case = 6;
|
|
1235
|
+
// console.log('++ case 6',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1236
|
+
illustrator.draw.draw_connection(block.svg, prev[node], pos, prev[node].row, false);
|
|
1237
|
+
}
|
|
779
1238
|
}
|
|
780
1239
|
}
|
|
781
1240
|
}
|
|
782
1241
|
// }}}
|
|
1242
|
+
|
|
1243
|
+
///////// show graph step by step
|
|
1244
|
+
// illustrator.set_svg_direct(block.svg);
|
|
1245
|
+
// debugger;
|
|
1246
|
+
|
|
783
1247
|
return [g, endnodes];
|
|
784
1248
|
} // }}}
|
|
785
1249
|
// }}}
|