Skip to content

Commit 90f27f9

Browse files
committed
refactoring, improvements and fixes
1 parent 29d7f14 commit 90f27f9

File tree

15 files changed

+107
-94
lines changed

15 files changed

+107
-94
lines changed

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
# Changelog
1+
## v0.2.5
22

3-
> The changelog just includes breaking changes along with its migration instructions.
3+
- support custom toolbar icon
4+
- support custom toolbar controls
5+
- support custom toolbar height
6+
- support custom window index
7+
- support window autosize
8+
- support new callbacks
9+
- improve drag pointer calculation when outside the viewport
10+
- improve toolbar template
11+
- improve window states
12+
- improve performance
413

5-
#### v0.0.1
14+
#### Migrations:
615

7-
- Initial Release
16+
- the classname `wb-icon` was renamed to `wb-control`
17+
- instead the new window heading toolbar icon was named as `wb-icon`

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ __Get Latest Stable Build (Recommended):__
3131
</tr>
3232
<tr>
3333
<td>winbox.bundle.min.js</td>
34-
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.4/dist/winbox.bundle.min.js" target="_blank">Download</a></td>
35-
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/dist/winbox.bundle.min.js" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/dist/winbox.bundle.min.js</a></td>
34+
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.5/dist/winbox.bundle.min.js" target="_blank">Download</a></td>
35+
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/dist/winbox.bundle.min.js" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/dist/winbox.bundle.min.js</a></td>
3636
</tr>
3737
<tr>
3838
<td colspan=3">
@@ -41,14 +41,14 @@ __Get Latest Stable Build (Recommended):__
4141
</tr>
4242
<tr>
4343
<td>winbox.min.js</td>
44-
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.4/dist/js/winbox.min.js" target="_blank">Download</a></td>
45-
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/dist/js/winbox.min.js" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/dist/js/winbox.min.js</a></td>
44+
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.5/dist/js/winbox.min.js" target="_blank">Download</a></td>
45+
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/dist/js/winbox.min.js" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/dist/js/winbox.min.js</a></td>
4646
</tr>
4747
<tr></tr>
4848
<tr>
4949
<td>winbox.min.css</td>
50-
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.4/dist/css/winbox.min.css" target="_blank">Download</a></td>
51-
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/dist/css/winbox.min.css" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/dist/css/winbox.min.css</a></td>
50+
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.5/dist/css/winbox.min.css" target="_blank">Download</a></td>
51+
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/dist/css/winbox.min.css" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/dist/css/winbox.min.css</a></td>
5252
</tr>
5353
<tr>
5454
<td colspan=3">
@@ -57,25 +57,25 @@ __Get Latest Stable Build (Recommended):__
5757
</tr>
5858
<tr>
5959
<td>ES6 Modules</td>
60-
<td><a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nextapps-de/winbox/tree/0.2.4/src/js" target="_blank">Download</a></td>
60+
<td><a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nextapps-de/winbox/tree/0.2.5/src/js" target="_blank">Download</a></td>
6161
<td>The <i>/src/js</i> folder of this Github repository</td>
6262
</tr>
6363
<tr></tr>
6464
<tr>
6565
<td>LESS Files (source)</td>
66-
<td><a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nextapps-de/winbox/tree/0.2.4/src/css" target="_blank">Download</a></td>
66+
<td><a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nextapps-de/winbox/tree/0.2.5/src/css" target="_blank">Download</a></td>
6767
<td>The <i>/src/css</i> folder of this Github repository</td>
6868
</tr>
6969
<tr></tr>
7070
<tr>
7171
<td>winbox.css (compiled)</td>
72-
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.4/src/css/winbox.css" target="_blank">Download</a></td>
73-
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/src/css/winbox.css" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.4/src/css/winbox.css</a></td>
72+
<td><a href="https://github.com/nextapps-de/winbox/raw/0.2.5/src/css/winbox.css" target="_blank">Download</a></td>
73+
<td><a href="https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/src/css/winbox.css" target="_blank">https://rawcdn.githack.com/nextapps-de/winbox/0.2.5/src/css/winbox.css</a></td>
7474
</tr>
7575
<tr></tr>
7676
<tr>
7777
<td>src.zip</td>
78-
<td><a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nextapps-de/winbox/tree/0.2.4/dist" target="_blank">Download</a></td>
78+
<td><a href="https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nextapps-de/winbox/tree/0.2.5/dist" target="_blank">Download</a></td>
7979
<td>Download all source files including image original resources.</td>
8080
</tr>
8181
</table>
@@ -149,7 +149,7 @@ You can also load modules via CDN, e.g.:
149149

150150
```html
151151
<script type="module">
152-
import WinBox from "https://unpkg.com/[email protected].4/src/js/winbox.js";
152+
import WinBox from "https://unpkg.com/[email protected].5/src/js/winbox.js";
153153
</script>
154154
```
155155

@@ -1295,9 +1295,9 @@ winbox.removeControl("wb-like")
12951295
<a name="template"></a>
12961296
## Custom Template (Layout)
12971297

1298-
You can fully customize the WinBox window layout by providing a custom `template` via the config during creation. This way you can add new controls to the window or re-arrange them.
1298+
You can fully customize the WinBox window layout by providing a custom `template` via the config during creation. This way you can add new elements to the window or re-arrange them.
12991299

1300-
This example will add two custom control buttons `.wb-like` and `.wb-custom` to the window toolbar by using a custom template along some CSS:
1300+
This example will add a control button `.wb-custom` to the window toolbar by using a custom template along some CSS:
13011301
```css
13021302
.wb-custom {
13031303
background-image: url(demo/icon-github.svg);
@@ -1310,7 +1310,7 @@ Create by using a custom template:
13101310
const template = document.createElement("div");
13111311
template.innerHTML = `
13121312
<div class=wb-header>
1313-
<div class=wb-icon>
1313+
<div class=wb-control>
13141314
<span class=wb-custom></span>
13151315
<span class=wb-close></span>
13161316
</div>
@@ -1352,7 +1352,7 @@ Modify a specific icon:
13521352

13531353
Use black standard icons (useful for bright backgrounds):
13541354
```css
1355-
.wb-icon { filter: invert(1) }
1355+
.wb-control { filter: invert(1) }
13561356
```
13571357

13581358
Modify or disable resizing areas on the window borders:
@@ -1394,7 +1394,7 @@ Style the header title:
13941394

13951395
Style the titlebar icon:
13961396
```css
1397-
.wb-image {
1397+
.wb-icon {
13981398
width: 35px;
13991399
background-size: 35px 35px;
14001400
}
@@ -1475,10 +1475,10 @@ Apply styles when window is in "focus" state:
14751475
.winbox.focus {
14761476
background: #0050ff;
14771477
}
1478-
.winbox .wb-icon {
1478+
.winbox .wb-control {
14791479
display: none;
14801480
}
1481-
.winbox.focus .wb-icon {
1481+
.winbox.focus .wb-control {
14821482
display: block;
14831483
}
14841484
```
@@ -1488,7 +1488,7 @@ Apply styles when window is NOT in "focus" state (the same logic from example ab
14881488
.winbox:not(.focus) {
14891489
background: #999;
14901490
}
1491-
.winbox:not(.focus) .wb-icon {
1491+
.winbox:not(.focus) .wb-control {
14921492
display: none;
14931493
}
14941494
```

dist/css/themes/modern.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/themes/white.min.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.winbox.white{background:#fff}.winbox.white .wb-title{color:#000}.winbox.white .wb-icon{filter:invert(1)}
1+
.winbox.white{background:#fff}.winbox.white .wb-title{color:#000}.winbox.white .wb-control{filter:invert(1)}

dist/css/winbox.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)