Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
chinaamc-2020flag
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
9c1d1e32
authored
Jan 08, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
11350c75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
Public/static/js/common.js
+5
-1
No files found.
Public/static/js/common.js
View file @
9c1d1e32
...
@@ -306,6 +306,7 @@ function changeMainColor(event) {
...
@@ -306,6 +306,7 @@ function changeMainColor(event) {
function
chooseColorStart
(
e
)
{
function
chooseColorStart
(
e
)
{
let
touch
=
e
.
originalEvent
.
targetTouches
[
0
];
let
touch
=
e
.
originalEvent
.
targetTouches
[
0
];
startX
=
(
touch
.
pageX
-
colorbarLeft
)
/
fontSize
;
startX
=
(
touch
.
pageX
-
colorbarLeft
)
/
fontSize
;
setBgColor
(
startX
);
}
}
function
chooseColorMove
(
e
)
{
function
chooseColorMove
(
e
)
{
...
@@ -316,7 +317,11 @@ function chooseColorMove(e) {
...
@@ -316,7 +317,11 @@ function chooseColorMove(e) {
timer
=
setTimeout
(()
=>
{
timer
=
setTimeout
(()
=>
{
let
touch
=
e
.
originalEvent
.
targetTouches
[
0
];
let
touch
=
e
.
originalEvent
.
targetTouches
[
0
];
moveX
=
(
touch
.
pageX
-
colorbarLeft
)
/
fontSize
;
moveX
=
(
touch
.
pageX
-
colorbarLeft
)
/
fontSize
;
setBgColor
(
moveX
);
},
5
);
}
function
setBgColor
(
moveX
)
{
if
(
moveX
<
4.2916
)
{
if
(
moveX
<
4.2916
)
{
moveX
=
4.2916
;
moveX
=
4.2916
;
}
else
if
(
moveX
>
26.62
)
{
}
else
if
(
moveX
>
26.62
)
{
...
@@ -340,7 +345,6 @@ function chooseColorMove(e) {
...
@@ -340,7 +345,6 @@ function chooseColorMove(e) {
$
(
'.personal-page'
).
css
(
'background'
,
colorList
[
mainColor
][
colorIndex
-
1
]);
$
(
'.personal-page'
).
css
(
'background'
,
colorList
[
mainColor
][
colorIndex
-
1
]);
$
(
'.personal-page .btn-choose-color'
).
css
(
'left'
,
moveX
+
'rem'
);
$
(
'.personal-page .btn-choose-color'
).
css
(
'left'
,
moveX
+
'rem'
);
},
5
);
}
}
function
initDecorate
()
{
function
initDecorate
()
{
...
...
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