You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2019/10/17 12:58:10 UTC
[atlas] branch master updated: ATLAS-3473: UI : Delay in loading
Lineage icon because of sync img call
This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 9ba3217 ATLAS-3473: UI : Delay in loading Lineage icon because of sync img call
9ba3217 is described below
commit 9ba321760e03148bcf59049888a42b69a3286541
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Thu Oct 17 14:22:17 2019 +0530
ATLAS-3473: UI : Delay in loading Lineage icon because of sync img call
Signed-off-by: Sarath Subramanian <sa...@apache.org>
---
.../public/js/views/graph/LineageLayoutView.js | 29 ++++++----------------
.../public/js/views/graph/LineageLayoutView.js | 29 ++++++----------------
2 files changed, 16 insertions(+), 42 deletions(-)
diff --git a/dashboardv2/public/js/views/graph/LineageLayoutView.js b/dashboardv2/public/js/views/graph/LineageLayoutView.js
index d481251..d638a73 100644
--- a/dashboardv2/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv2/public/js/views/graph/LineageLayoutView.js
@@ -584,8 +584,7 @@ define(['require',
var imagePath = options.imagePath,
ajaxOptions = {
"url": imagePath,
- "method": "get",
- "async": false,
+ "method": "get"
}
if (platform.name !== "IE") {
@@ -604,28 +603,16 @@ define(['require',
} else {
imageObject[imageIconPath] = imagePath;
}
+ d3.select(that).attr("xlink:href", imageObject[imageIconPath]);
+ if (imageIconPath !== shapeSvg.attr("data-iconpath")) {
+ shapeSvg.attr("data-iconpathorigin", imageIconPath);
+ }
}
});
}
- if (_.keys(imageObject).indexOf(imageIconPath) === -1) {
- getImageData({
- "imagePath": imageIconPath
- });
- }
-
- if (_.isUndefined(imageObject[imageIconPath])) {
- // before img success
- imageObject[imageIconPath] = [d3.select(that)];
- } else if (_.isArray(imageObject[imageIconPath])) {
- // before img success
- imageObject[imageIconPath].push(d3.select(that));
- } else {
- d3.select(that).attr("xlink:href", imageObject[imageIconPath]);
- if (imageIconPath !== shapeSvg.attr("data-iconpath")) {
- shapeSvg.attr("data-iconpathorigin", imageIconPath);
- }
- return imageObject[imageIconPath];
- }
+ getImageData({
+ "imagePath": imageIconPath
+ });
}
})
.attr("x", "4")
diff --git a/dashboardv3/public/js/views/graph/LineageLayoutView.js b/dashboardv3/public/js/views/graph/LineageLayoutView.js
index a15047c..541eb84 100644
--- a/dashboardv3/public/js/views/graph/LineageLayoutView.js
+++ b/dashboardv3/public/js/views/graph/LineageLayoutView.js
@@ -599,8 +599,7 @@ define(['require',
var imagePath = options.imagePath,
ajaxOptions = {
"url": imagePath,
- "method": "get",
- "async": false,
+ "method": "get"
}
if (platform.name !== "IE") {
@@ -619,28 +618,16 @@ define(['require',
} else {
imageObject[imageIconPath] = imagePath;
}
+ d3.select(that).attr("xlink:href", imageObject[imageIconPath]);
+ if (imageIconPath !== shapeSvg.attr("data-iconpath")) {
+ shapeSvg.attr("data-iconpathorigin", imageIconPath);
+ }
}
});
}
- if (_.keys(imageObject).indexOf(imageIconPath) === -1) {
- getImageData({
- "imagePath": imageIconPath
- });
- }
-
- if (_.isUndefined(imageObject[imageIconPath])) {
- // before img success
- imageObject[imageIconPath] = [d3.select(that)];
- } else if (_.isArray(imageObject[imageIconPath])) {
- // before img success
- imageObject[imageIconPath].push(d3.select(that));
- } else {
- d3.select(that).attr("xlink:href", imageObject[imageIconPath]);
- if (imageIconPath !== shapeSvg.attr("data-iconpath")) {
- shapeSvg.attr("data-iconpathorigin", imageIconPath);
- }
- return imageObject[imageIconPath];
- }
+ getImageData({
+ "imagePath": imageIconPath
+ });
}
})
.attr("x", "4")