Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
868f84a6
Commit
868f84a6
authored
Jun 19, 2018
by
陈帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete some no no needrequestAnimationFrame
parent
8e3050ae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
20 deletions
+14
-20
src/components/Charts/Radar/index.js
src/components/Charts/Radar/index.js
+1
-3
src/components/Charts/WaterWave/index.js
src/components/Charts/WaterWave/index.js
+2
-4
src/routes/Profile/AdvancedProfile.js
src/routes/Profile/AdvancedProfile.js
+11
-13
No files found.
src/components/Charts/Radar/index.js
View file @
868f84a6
...
@@ -12,9 +12,7 @@ export default class Radar extends Component {
...
@@ -12,9 +12,7 @@ export default class Radar extends Component {
};
};
componentDidMount
()
{
componentDidMount
()
{
requestAnimationFrame
(()
=>
{
this
.
getLegendData
();
this
.
getLegendData
();
});
}
}
componentDidUpdate
(
preProps
)
{
componentDidUpdate
(
preProps
)
{
...
...
src/components/Charts/WaterWave/index.js
View file @
868f84a6
...
@@ -13,10 +13,8 @@ export default class WaterWave extends PureComponent {
...
@@ -13,10 +13,8 @@ export default class WaterWave extends PureComponent {
};
};
componentDidMount
()
{
componentDidMount
()
{
requestAnimationFrame
(()
=>
{
this
.
renderChart
();
this
.
renderChart
();
this
.
resize
();
this
.
resize
();
});
window
.
addEventListener
(
window
.
addEventListener
(
'
resize
'
,
'
resize
'
,
()
=>
{
()
=>
{
...
...
src/routes/Profile/AdvancedProfile.js
View file @
868f84a6
...
@@ -212,7 +212,6 @@ export default class AdvancedProfile extends Component {
...
@@ -212,7 +212,6 @@ export default class AdvancedProfile extends Component {
@
Bind
()
@
Bind
()
@
Debounce
(
200
)
@
Debounce
(
200
)
setStepDirection
()
{
setStepDirection
()
{
requestAnimationFrame
(()
=>
{
const
{
stepDirection
}
=
this
.
state
;
const
{
stepDirection
}
=
this
.
state
;
const
w
=
getWindowWidth
();
const
w
=
getWindowWidth
();
if
(
stepDirection
!==
'
vertical
'
&&
w
<=
576
)
{
if
(
stepDirection
!==
'
vertical
'
&&
w
<=
576
)
{
...
@@ -224,7 +223,6 @@ export default class AdvancedProfile extends Component {
...
@@ -224,7 +223,6 @@ export default class AdvancedProfile extends Component {
stepDirection
:
'
horizontal
'
,
stepDirection
:
'
horizontal
'
,
});
});
}
}
});
}
}
render
()
{
render
()
{
...
...
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