Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
maf
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2f8e8323
authored
Jan 15, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
0db8de1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
Public/static/js/common.js
+14
-6
No files found.
Public/static/js/common.js
View file @
2f8e8323
...
@@ -66,6 +66,8 @@ let resultType = 8;
...
@@ -66,6 +66,8 @@ let resultType = 8;
let
submitStatus
=
true
;
let
submitStatus
=
true
;
//是否已经看过规则
//是否已经看过规则
let
checkedRule
=
false
;
let
checkedRule
=
false
;
//滚动防抖定时器
let
timer
;
//记录初始状态下fontsize
//记录初始状态下fontsize
const
fontSize
=
parseFloat
(
$
(
'html'
).
css
(
'fontSize'
));
const
fontSize
=
parseFloat
(
$
(
'html'
).
css
(
'fontSize'
));
...
@@ -160,13 +162,19 @@ $(document).ready(function () {
...
@@ -160,13 +162,19 @@ $(document).ready(function () {
function
ruleScroll
()
{
function
ruleScroll
()
{
//7.9-46.9
//7.9-46.9
let
blockHeight
=
$
(
'.rule-block'
).
height
()
/
fontSize
;
//rem
if
(
timer
)
{
let
wrapHeight
=
155
;
//rem
clearTimeout
(
timer
);
let
scrollHeight
=
wrapHeight
-
blockHeight
;
//rem
}
let
step
=
(
39
*
fontSize
)
/
(
scrollHeight
*
fontSize
);
timer
=
setTimeout
(()
=>
{
let
blockHeight
=
$
(
'.rule-block'
).
height
()
/
fontSize
;
//rem
let
wrapHeight
=
155
;
//rem
let
scrollHeight
=
wrapHeight
-
blockHeight
;
//rem
let
step
=
(
39
*
fontSize
)
/
(
scrollHeight
*
fontSize
);
let
scrollTop
=
$
(
'.rule-block'
).
scrollTop
();
$
(
'.scroll-bar'
).
css
(
'top'
,
(
7.9
*
fontSize
)
+
scrollTop
*
step
+
'px'
);
},
5
);
let
scrollTop
=
$
(
'.rule-block'
).
scrollTop
();
$
(
'.scroll-bar'
).
css
(
'top'
,
(
7.9
*
fontSize
)
+
scrollTop
*
step
+
'px'
);
}
}
function
hideRule
()
{
function
hideRule
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment