Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit ed9d861

Browse files
committed
🐛 Fix multi output dependency graph.
1 parent 71320f6 commit ed9d861

File tree

6 files changed

+29
-25
lines changed

6 files changed

+29
-25
lines changed

dash_renderer/dash_renderer.dev.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35226,15 +35226,18 @@ var graphs = function graphs() {
3522635226
outputId = output.id + '.' + output.property;
3522735227
} else {
3522835228
outputId = output;
35229-
output.substr(2, output.length - 2).split('..').forEach(function (out) {
35230-
inputGraph.addNode(out);
35231-
inputs.forEach(function (i) {
35232-
if (!inputGraph.hasNode(i)) {
35233-
inputGraph.addNode(i);
35234-
}
35235-
inputGraph.addDependency(i, out);
35229+
if (output.startsWith('.')) {
35230+
output.slice(2, output.length - 2).split('...').forEach(function (out) {
35231+
inputGraph.addNode(out);
35232+
inputs.forEach(function (i) {
35233+
var inputId = i.id + '.' + i.property;
35234+
if (!inputGraph.hasNode(inputId)) {
35235+
inputGraph.addNode(inputId);
35236+
}
35237+
inputGraph.addDependency(inputId, out);
35238+
});
3523635239
});
35237-
});
35240+
}
3523835241
}
3523935242

3524035243
inputs.forEach(function (inputObject) {

dash_renderer/dash_renderer.dev.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_renderer/dash_renderer.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_renderer/dash_renderer.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
dash_core_components==0.33.0
2-
dash_html_components==0.11.0rc5
31
-e git+git://github.com/plotly/dash@multi-output#egg=dash
42
percy
53
selenium

src/reducers/dependencyGraph.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,22 @@ const graphs = (state = initialGraph, action) => {
1919
outputId= `${output.id}.${output.property}`;
2020
} else {
2121
outputId = output;
22-
output.substr(2, output.length - 2).split('..').forEach(
23-
out => {
24-
inputGraph.addNode(out);
25-
inputs.forEach(
26-
i => {
27-
if (!inputGraph.hasNode(i)) {
28-
inputGraph.addNode(i);
22+
if (output.startsWith('.')) {
23+
output.slice(2, output.length - 2).split('...').forEach(
24+
out => {
25+
inputGraph.addNode(out);
26+
inputs.forEach(
27+
i => {
28+
const inputId = `${i.id}.${i.property}`;
29+
if (!inputGraph.hasNode(inputId)) {
30+
inputGraph.addNode(inputId);
31+
}
32+
inputGraph.addDependency(inputId, out);
2933
}
30-
inputGraph.addDependency(i, out);
31-
}
32-
);
33-
}
34-
)
34+
);
35+
}
36+
)
37+
}
3538
}
3639

3740
inputs.forEach(inputObject => {

0 commit comments

Comments
 (0)