Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
0cb744d6
Commit
0cb744d6
authored
Apr 29, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'global-entry-slide-out' into dev
parents
d0d4b252
91ca11e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
src/App.js
+2
-1
No files found.
src/App.js
View file @
0cb744d6
...
@@ -305,6 +305,7 @@ class App extends Component {
...
@@ -305,6 +305,7 @@ class App extends Component {
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
const
_this
=
this
const
_this
=
this
const
entryWidth
=
this
.
globalEntry
.
offsetWidth
const
entryWidth
=
this
.
globalEntry
.
offsetWidth
const
velocityThreshold
=
0.4
mc
.
on
(
'panright tap panend'
,
function
(
e
)
{
mc
.
on
(
'panright tap panend'
,
function
(
e
)
{
if
(
e
.
type
===
'tap'
)
{
if
(
e
.
type
===
'tap'
)
{
...
@@ -312,7 +313,7 @@ class App extends Component {
...
@@ -312,7 +313,7 @@ class App extends Component {
}
else
if
(
e
.
type
===
'panright'
)
{
}
else
if
(
e
.
type
===
'panright'
)
{
_this
.
globalEntry
.
style
.
transform
=
`translateX(
${
e
.
deltaX
}
px)`
_this
.
globalEntry
.
style
.
transform
=
`translateX(
${
e
.
deltaX
}
px)`
}
else
{
}
else
{
if
(
e
.
deltaX
>
entryWidth
/
2
)
{
if
(
e
.
deltaX
>
entryWidth
/
2
||
e
.
velocityX
>
velocityThreshold
)
{
_this
.
globalEntry
.
style
.
transition
=
`.2s`
_this
.
globalEntry
.
style
.
transition
=
`.2s`
_this
.
globalEntry
.
style
.
transform
=
`translateX(
${
entryWidth
+
10
}
px)`
_this
.
globalEntry
.
style
.
transform
=
`translateX(
${
entryWidth
+
10
}
px)`
_this
.
closeGlobalEntry
()
_this
.
closeGlobalEntry
()
...
...
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