@bizdoc/core 1.10.0-next.2 → 1.10.0-next.3

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.
@@ -12944,21 +12944,26 @@ class FlowViewComponent extends TraceBase {
12944
12944
  const { connectors: dconnectors } = this.model.workflow;
12945
12945
  while (i < dconnectors.length) {
12946
12946
  let connector = dconnectors[i];
12947
- if (nodeMap[connector.targetId]) {
12948
- nodeMap[connector.sourceId] && connectors.push({
12949
- sourceID: connector.sourceId,
12950
- targetID: connector.targetId,
12951
- addInfo: {
12952
- estimate: connector.estimate,
12953
- time: connector.time
12954
- }
12955
- });
12947
+ if (nodeMap[connector.sourceId]) {
12948
+ if (nodeMap[connector.targetId]) {
12949
+ connectors.push({
12950
+ sourceID: connector.sourceId,
12951
+ targetID: connector.targetId,
12952
+ addInfo: {
12953
+ estimate: connector.estimate,
12954
+ time: connector.time
12955
+ }
12956
+ });
12957
+ }
12958
+ else
12959
+ reroute(connector, i + 1);
12956
12960
  }
12957
- else
12958
- reroute(connector, 1);
12959
12961
  i++;
12960
12962
  }
12961
- function reroute(connector, index) {
12963
+ function reroute(connector, index, vconnectors = []) {
12964
+ if (vconnectors.indexOf(connector) > -1)
12965
+ return;
12966
+ vconnectors.push(connector);
12962
12967
  while (index < dconnectors.length - 1) {
12963
12968
  let tconnector = dconnectors[index];
12964
12969
  if (tconnector.sourceId === connector.targetId) {
@@ -12975,7 +12980,7 @@ class FlowViewComponent extends TraceBase {
12975
12980
  reroute({
12976
12981
  ...tconnector,
12977
12982
  sourceId: connector.sourceId
12978
- }, 1);
12983
+ }, index + 1, vconnectors);
12979
12984
  }
12980
12985
  index++;
12981
12986
  }
@@ -13022,10 +13027,12 @@ class FlowViewComponent extends TraceBase {
13022
13027
  _tooltip(obj) {
13023
13028
  const { note, role, substituting, duration, standardTime, estimatedTime, error, fyi } = obj;
13024
13029
  const rows = [error, note, role, substituting, fyi, duration, standardTime, estimatedTime];
13025
- const div = document.createElement('div');
13030
+ let div;
13026
13031
  rows.forEach(r => {
13027
13032
  if (!r)
13028
13033
  return;
13034
+ if (!div)
13035
+ div = document.createElement('div');
13029
13036
  const span = document.createElement('span');
13030
13037
  span.innerText = r;
13031
13038
  div.append(span);