Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
831d71af
Commit
831d71af
authored
May 03, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splitting in 2 events: toggleContent and showContent
parent
33852ebc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
swap-panel-api.js
src/app/components/swap-panel-api.js
+7
-1
vertical-icons-component.js
src/app/components/vertical-icons-component.js
+3
-1
No files found.
src/app/components/swap-panel-api.js
View file @
831d71af
...
@@ -5,7 +5,7 @@ class SwapPanelApi {
...
@@ -5,7 +5,7 @@ class SwapPanelApi {
this
.
event
=
new
EventEmmitter
()
this
.
event
=
new
EventEmmitter
()
this
.
component
=
swapPanelComponent
this
.
component
=
swapPanelComponent
this
.
currentContent
this
.
currentContent
verticalIconsComponent
.
events
.
on
(
'
show
Content'
,
(
moduleName
)
=>
{
verticalIconsComponent
.
events
.
on
(
'
toggle
Content'
,
(
moduleName
)
=>
{
if
(
!
swapPanelComponent
.
contents
[
moduleName
])
return
if
(
!
swapPanelComponent
.
contents
[
moduleName
])
return
if
(
this
.
currentContent
===
moduleName
)
{
if
(
this
.
currentContent
===
moduleName
)
{
this
.
event
.
emit
(
'toggle'
,
moduleName
)
this
.
event
.
emit
(
'toggle'
,
moduleName
)
...
@@ -14,6 +14,12 @@ class SwapPanelApi {
...
@@ -14,6 +14,12 @@ class SwapPanelApi {
this
.
showContent
(
moduleName
)
this
.
showContent
(
moduleName
)
this
.
event
.
emit
(
'showing'
,
moduleName
)
this
.
event
.
emit
(
'showing'
,
moduleName
)
})
})
verticalIconsComponent
.
events
.
on
(
'showContent'
,
(
moduleName
)
=>
{
if
(
!
swapPanelComponent
.
contents
[
moduleName
])
return
this
.
showContent
(
moduleName
)
this
.
event
.
emit
(
'showing'
,
moduleName
)
})
}
}
showContent
(
moduleName
)
{
showContent
(
moduleName
)
{
...
...
src/app/components/vertical-icons-component.js
View file @
831d71af
...
@@ -209,7 +209,9 @@ class VerticalIconComponent {
...
@@ -209,7 +209,9 @@ class VerticalIconComponent {
}
}
_iconClick
(
name
)
{
_iconClick
(
name
)
{
this
.
select
(
name
)
this
.
removeActive
()
this
.
addActive
(
name
)
this
.
events
.
emit
(
'toggleContent'
,
name
)
}
}
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