[UI] Move reset view button to left and change plan graph listener from click to dblclick (#3147)
diff --git a/heron/tools/ui/resources/static/css/visstyle.css b/heron/tools/ui/resources/static/css/visstyle.css
index 9109935..6ad85ad 100644
--- a/heron/tools/ui/resources/static/css/visstyle.css
+++ b/heron/tools/ui/resources/static/css/visstyle.css
@@ -29,7 +29,7 @@
.reset {
position: absolute;
top: 1em;
- right: 1em;
+ left: 1em;
z-index: 100;
}
diff --git a/heron/tools/ui/resources/static/js/logical-plan.js b/heron/tools/ui/resources/static/js/logical-plan.js
index 99b680d..e5cb531 100644
--- a/heron/tools/ui/resources/static/js/logical-plan.js
+++ b/heron/tools/ui/resources/static/js/logical-plan.js
@@ -393,6 +393,7 @@
return d.color;
})
.on("click", planController.logicalComponentClicked)
+ .on("dblclick", planController.logicalComponentClicked)
.on("mouseover", planController.logicalComponentHoverOver)
.on("mouseout", planController.logicalComponentHoverOut);
@@ -402,6 +403,7 @@
.attr("y", function (d) { return d.cy - d.r - 10; })
.attr("class", "fade")
.style("text-anchor", "middle")
+ .style("user-select", "all")
.text(function (d) {
if (d.isReal) {
return d.name;
diff --git a/heron/tools/ui/resources/static/js/plan-controller.js b/heron/tools/ui/resources/static/js/plan-controller.js
index 0567a2f..5482e43 100644
--- a/heron/tools/ui/resources/static/js/plan-controller.js
+++ b/heron/tools/ui/resources/static/js/plan-controller.js
@@ -184,8 +184,8 @@
highlightFocusedElements();
};
- // treat any click that bubbles up unhandled as intent to clear the focus
- $(document).on('click', ".plans .graphics", function () {
+ // treat double click as intent to clear the focus
+ $(document).on('dblclick', ".plans .graphics", function () {
window.location.hash = "/";
});
$(document).on('click', ".reset", function () {