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
1022b91a
Commit
1022b91a
authored
Jan 17, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix adding / removing content
parent
c5aafbfa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
swap-panel-component.js
src/app/components/swap-panel-component.js
+3
-3
vertical-icons-component.js
src/app/components/vertical-icons-component.js
+5
-3
No files found.
src/app/components/swap-panel-component.js
View file @
1022b91a
...
...
@@ -27,13 +27,13 @@ class SwapPanelComponent {
}
add
(
moduleName
,
content
)
{
this
.
contents
[
moduleName
]
=
yo
`<div
id='
${
moduleName
}
Content'
class=
${
css
.
plugItIn
}
>
${
content
}
</div>`
this
.
contents
[
moduleName
]
=
yo
`<div class=
${
css
.
plugItIn
}
>
${
content
}
</div>`
this
.
view
.
appendChild
(
this
.
contents
[
moduleName
])
}
remove
(
moduleName
)
{
var
el
=
this
.
view
.
querySelector
(
`div#
${
moduleName
}
Content`
)
el
.
parentElement
.
removeChild
(
el
)
let
el
=
this
.
contents
[
moduleName
]
if
(
el
)
el
.
parentElement
.
removeChild
(
el
)
}
render
()
{
...
...
src/app/components/vertical-icons-component.js
View file @
1022b91a
...
...
@@ -12,16 +12,18 @@ class VerticalIconComponent {
constructor
()
{
this
.
event
=
new
EventEmmitter
()
this
.
icons
=
{}
}
addIcon
(
mod
)
{
let
self
=
this
this
.
view
.
appendChild
(
yo
`<div id="
${
mod
.
name
}
Icon" class="
${
css
.
icon
}
" onclick=
${(
e
)
=>
{
self
.
_iconClick
(
mod
.
name
)
}}
title
=
$
{
mod
.
name
}
><img src="
${
mod
.
icon
}
" alt="
${
mod
.
name
}
" /></div>`
)
this
.
icons
[
mod
.
name
]
=
yo
`<div class="
${
css
.
icon
}
" onclick=
${(
e
)
=>
{
self
.
_iconClick
(
mod
.
name
)
}}
title
=
$
{
mod
.
name
}
><img src="
${
mod
.
icon
}
" alt="
${
mod
.
name
}
" /></div>`
this
.
view
.
appendChild
(
this
.
icons
[
mod
.
name
])
}
removeIcon
(
mod
)
{
var
el
=
this
.
view
.
querySelector
(
`#
${
mod
.
name
}
Icon`
)
el
.
parentElement
.
removeChild
(
el
)
let
el
=
this
.
icons
[
mod
.
name
]
if
(
el
)
el
.
parentElement
.
removeChild
(
el
)
}
select
(
name
)
{
...
...
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