Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Questdb
提交
d551aa41
Q
Questdb
项目概览
jobily
/
Questdb
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
Questdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
d551aa41
编写于
4月 25, 2020
作者:
M
Méril
提交者:
GitHub
4月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(grid): do not scroll to last item when scrollTop is bigger than 4 times the viewport (#228)
上级
018b0322
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
29 deletion
+23
-29
core/src/main/resources/site/public/qdb.js
core/src/main/resources/site/public/qdb.js
+1
-1
ui/.eslintrc.js
ui/.eslintrc.js
+3
-0
ui/package.json
ui/package.json
+1
-1
ui/src/js/console/grid.js
ui/src/js/console/grid.js
+18
-27
未找到文件。
core/src/main/resources/site/public/qdb.js
浏览文件 @
d551aa41
此差异已折叠。
点击以展开。
ui/.eslintrc.js
浏览文件 @
d551aa41
...
...
@@ -17,6 +17,7 @@ module.exports = {
"
prettier/babel
"
,
"
prettier/standard
"
,
],
globals
:
{
ace
:
true
},
parser
:
"
@typescript-eslint/parser
"
,
parserOptions
:
{
ecmaFeatures
:
{},
...
...
@@ -29,6 +30,8 @@ module.exports = {
rules
:
{
"
@typescript-eslint/prefer-interface
"
:
"
off
"
,
"
@typescript-eslint/no-empty-function
"
:
"
off
"
,
"
@typescript-eslint/explicit-function-return-type
"
:
"
off
"
,
"
@typescript-eslint/no-this-alias
"
:
"
off
"
,
"
quote-props
"
:
[
"
error
"
,
"
as-needed
"
],
"
object-shorthand
"
:
[
"
error
"
,
"
always
"
],
"
no-var
"
:
[
"
error
"
],
...
...
ui/package.json
浏览文件 @
d551aa41
...
...
@@ -12,7 +12,7 @@
"node"
:
">=12.16.2"
},
"scripts"
:
{
"ci:lint
:ts"
:
"eslint 'src/**/*.ts
' --max-warnings=0 --config .eslintrc.js"
,
"ci:lint
"
:
"eslint 'src/js/**/*
' --max-warnings=0 --config .eslintrc.js"
,
"type-check"
:
"tsc --noEmit"
,
"type-check:watch"
:
"npm run type-check -- --watch"
,
"build"
:
"cross-env NODE_ENV=production webpack && node utils/deploy.js"
,
...
...
ui/src/js/console/grid.js
浏览文件 @
d551aa41
...
...
@@ -490,41 +490,32 @@ $.fn.grid = function (msgBus) {
}
}
function
viewportScroll
(
force
)
{
function
viewportScroll
(
event
)
{
header
.
scrollLeft
(
viewport
.
scrollLeft
)
var
scrollTop
=
viewport
.
scrollTop
if
(
scrollTop
!==
top
||
force
)
{
if
(
scrollTop
!==
top
||
event
)
{
var
oldY
=
y
if
(
Math
.
abs
(
scrollTop
-
top
)
>
4
*
vp
)
{
y
=
scrollTop
===
0
?
0
:
Math
.
min
(
Math
.
ceil
((
scrollTop
+
vp
)
*
M
-
vp
),
yMax
-
vp
)
// if grid content fits in viewport we don't need to adjust activeRow
if
(
scrollTop
>=
h
-
vp
)
{
// final leap to bottom of grid
// this happens when container div runs out of vertical height
// and we artificially force leap to bottom
y
=
Math
.
max
(
0
,
yMax
-
vp
)
top
=
scrollTop
o
=
y
-
top
}
else
if
(
h
-
vp
>
0
)
{
// if grid content fits in viewport we don't need to adjust activeRow
if
(
scrollTop
>=
h
-
vp
)
{
// final leap to bottom of grid
// this happens when container div runs out of vertical height
// and we artificially force leap to bottom
y
=
Math
.
max
(
0
,
yMax
-
vp
)
top
=
scrollTop
o
=
y
-
top
activeRowDown
(
r
-
activeRow
)
activeRowDown
(
r
-
activeRow
)
}
else
{
if
(
scrollTop
===
0
&&
top
>
0
)
{
// this happens when grid is coming slowly back up after being scrolled down harshly
// because 'y' is much greater than top, we have to jump to top artificially.
y
=
0
o
=
0
activeRowUp
(
activeRow
)
}
else
{
if
(
scrollTop
===
0
&&
top
>
0
)
{
// this happens when grid is coming slowly back up after being scrolled down harshly
// because 'y' is much greater than top, we have to jump to top artificially.
y
=
0
o
=
0
activeRowUp
(
activeRow
)
}
else
{
y
+=
scrollTop
-
top
}
top
=
scrollTop
y
+=
scrollTop
-
top
}
top
=
scrollTop
}
renderViewport
(
y
-
oldY
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录