浏览代码

HUE-989 [editot] Scroll to column in result set does not update the horizontal scroll bar (#904)

* select 'tbody> tr td' to find startCol

* Revert "select 'tbody> tr td' to find startCol"

This reverts commit 313152f

* [FIX][HUE-898] add the horizontal offset of '' (the result table) to the header element to make the condition meaningful (compare in the same coordinate system)

* [MOD] fix code style issue

* [MOD] fix code style issue
linwukang 6 年之前
父节点
当前提交
832f6ae359
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      desktop/core/src/desktop/js/jquery/plugins/jquery.huedatatable.js

+ 4 - 1
desktop/core/src/desktop/js/jquery/plugins/jquery.huedatatable.js

@@ -440,7 +440,10 @@ $.fn.hueDataTable = function(oInit) {
           if ($(this).position().left > 0 && startCol == -1) {
             startCol = i;
           }
-          if ($(this).position().left < $t.parent().width() + $t.parent().position().left) {
+          if (
+            $(this).position().left + $t.position().left <
+            $t.parent().width() + $t.parent().position().left
+          ) {
             endCol = i;
           }
         });