Selaa lähdekoodia

HUE-6499 [oozie] Improve arrow rendering on Hue 4 workflows

Enrico Berti 8 vuotta sitten
vanhempi
commit
f4a1fe6
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

+ 4 - 2
apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

@@ -1264,19 +1264,21 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
       var _to = $("#wdg_" + (typeof toId == "function" ? toId() : toId));
       if (_from.length > 0 && _to.length > 0) {
         var $painter = $(document.body);
+        var correction = 0;
 
         if ($('.oozie_workflowComponents').length > 0) {
           $painter = $('.oozie_workflowComponents');
+          correction = $('.page-content').scrollTop();
         }
 
         var _fromCenter = {
           x: _from.position().left + _from.outerWidth() / 2,
-          y: _from.position().top + _from.outerHeight() + 3
+          y: _from.position().top + correction + _from.outerHeight() + 3
         }
 
         var _toCenter = {
           x: _to.position().left + _to.outerWidth() / 2,
-          y: _to.position().top - 5
+          y: _to.position().top + correction - 5
         }
 
         var _curveCoords = {};