Skip to content

Commit d68c681

Browse files
authored
Merge pull request #156 from asith-w/master
Changing class names for toolbar plugin.
2 parents c3e8647 + 0da4103 commit d68c681

File tree

2 files changed

+41
-36
lines changed

2 files changed

+41
-36
lines changed

src/plugin/toolBar.less

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1-
toolbar {
2-
position: absolute;
3-
background: #fff;
4-
padding: 10px;
5-
border-radius: 5px;
6-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
7-
span {
8-
&:active {
9-
opacity: 0.5;
10-
}
11-
}
12-
}
13-
.rb {
14-
right: 20px;
15-
bottom: 20px;
16-
font-family: iconfont;
17-
span + span {
18-
margin-left: 10px;
19-
}
20-
}
1+
.mind-elixir-toolbar {
2+
position: absolute;
3+
background: #fff;
4+
padding: 10px;
5+
border-radius: 5px;
6+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
217

22-
.lt {
23-
font-size: 20px;
24-
left: 20px;
25-
top: 20px;
26-
width: 20px;
27-
span {
28-
display: block;
29-
}
30-
span + span {
31-
margin-top: 10px;
32-
}
33-
}
8+
span {
9+
&:active {
10+
opacity: 0.5;
11+
}
12+
}
13+
}
14+
15+
.mind-elixir-toolbar.rb {
16+
right: 20px;
17+
bottom: 20px;
18+
font-family: iconfont;
19+
20+
span+span {
21+
margin-left: 10px;
22+
}
23+
}
24+
25+
.mind-elixir-toolbar.lt {
26+
font-size: 20px;
27+
left: 20px;
28+
top: 20px;
29+
width: 20px;
30+
31+
span {
32+
display: block;
33+
}
34+
35+
span+span {
36+
margin-top: 10px;
37+
}
38+
}

src/plugin/toolBar.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const createButton = (id, name) => {
1010
}
1111

1212
function createToolBarRBContainer(mind) {
13-
const toolBarRBContainer = document.createElement('toolbar')
13+
const toolBarRBContainer = document.createElement('div')
1414
const fc = createButton('fullscreen', 'full')
1515
const gc = createButton('toCenter', 'living')
1616
const zo = createButton('zoomout', 'move')
@@ -22,7 +22,7 @@ function createToolBarRBContainer(mind) {
2222
toolBarRBContainer.appendChild(zo)
2323
toolBarRBContainer.appendChild(zi)
2424
// toolBarRBContainer.appendChild(percentage)
25-
toolBarRBContainer.className = 'rb'
25+
toolBarRBContainer.className = 'mind-elixir-toolbar rb'
2626
fc.onclick = () => {
2727
mind.container.requestFullscreen()
2828
}
@@ -40,15 +40,15 @@ function createToolBarRBContainer(mind) {
4040
return toolBarRBContainer
4141
}
4242
function createToolBarLTContainer(mind) {
43-
const toolBarLTContainer = document.createElement('toolbar')
43+
const toolBarLTContainer = document.createElement('div')
4444
const l = createButton('tbltl', 'left')
4545
const r = createButton('tbltr', 'right')
4646
const s = createButton('tblts', 'side')
4747

4848
toolBarLTContainer.appendChild(l)
4949
toolBarLTContainer.appendChild(r)
5050
toolBarLTContainer.appendChild(s)
51-
toolBarLTContainer.className = 'lt'
51+
toolBarLTContainer.className = 'mind-elixir-toolbar lt'
5252
l.onclick = () => {
5353
mind.initLeft()
5454
}

0 commit comments

Comments
 (0)