Bläddra i källkod

Bug: 1025 Graph Page Circular Call

Prevent a circular event/notification loop which could make the graph control "jump".

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Gordon Smith 13 år sedan
förälder
incheckning
d1790d0753

+ 1 - 2
esp/eclwatch/ws_XSLT/GvcGraph.xslt

@@ -113,14 +113,13 @@
 
     function onLoad()
     {
-
       addEvent(pluginLHS(), 'LayoutFinished', layoutFinished);
       addEvent(pluginRHS(), 'LayoutFinished', layoutFinishedRHS);
       addEvent(pluginLHS(), 'Scaled', scaled);
       addEvent(pluginRHS(), 'Scaled', scaled2);
       addEvent(pluginLHS(), 'MouseDoubleClick', mouseDoubleClick);
+      addEvent(pluginRHS(), 'MouseDoubleClick', mouseDoubleClickRHS);
       addEvent(pluginLHS(), 'SelectionChanged', selectionChanged);
-      addEvent(pluginRHS(), 'SelectionChanged', selectionChangedRHS);
 
       var thisEsp = getEspAddressAndPort(document.location.href);
       if (graphType == 'roxieconfig')

+ 2 - 3
esp/eclwatch/ws_XSLT/graph_gvc_common.xslt

@@ -27,8 +27,7 @@
       </tbody>
     </table>
     <br />
-    
-    <table width="100%">
+    <table width="100%" cellSpacing="5" style="border-collapse:separate;border-spacing:5;">
       <tr>
         <td width="80%" valign="top">
           <object id="pluginLHS" type="application/x-hpccsystemsgraphviewcontrol" standby="Loading HPCC Systems GraphView Control..."
@@ -90,7 +89,7 @@
           </table>
           
         </td>
-        <td valign="top">
+        <td width="20%" valign="top">
           <object id="pluginRHS" type="application/x-hpccsystemsgraphviewcontrol" standby="Loading HPCC Systems GraphView Control..." style="width:100%; height:500px;">
           </object>
           <div id="zoom2-slider-bg" class="yui-h-slider" tabindex="-1" title="Zoom Mini Graph" style="text-align:left;">

+ 11 - 3
esp/files/scripts/graphgvc.js

@@ -49,6 +49,8 @@ var havesubgraphtimings = '1';
 
 var espUri = null;
 
+var sliderNoFeedback=false;
+
 function go(url)
 {
    document.location.href=url;
@@ -93,7 +95,7 @@ function selectionChanged(items) {
     DisplaySelectedProperties(items);
 }
 
-function selectionChangedRHS(items) {
+function mouseDoubleClickRHS(items) {
     var selection = pluginRHS().getSelectionAsGlobalID();
     pluginLHS().setSelectedAsGlobalID(selection);
     DisplaySelectedProperties(pluginLHS().getSelection());
@@ -168,21 +170,27 @@ function layoutFinished() {
 }
 
 function scaled(newScale) {
+    sliderNoFeedback = true;
     slider.setValue(newScale);
+    sliderNoFeedback = false;
 }
 
 function scaled2(newScale) {
+    sliderNoFeedback = true;
     slider2.setValue(newScale);
+    sliderNoFeedback = false;
 }
 
 var oldScale;
 function setScale(newScale) {
-    oldScale = pluginLHS().setScale(newScale);
+    if (!sliderNoFeedback)
+        oldScale = pluginLHS().setScale(newScale);
 }
 
 var oldScale;
 function setScaleRHS(newScale) {
-    oldScale = pluginRHS().setScale(newScale);
+    if (!sliderNoFeedback)
+        oldScale = pluginRHS().setScale(newScale);
 }
 
 function onUnload()