Skip to content

Commit

Permalink
Fix zindex bug and fix npm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
SkwalExe committed Jul 19, 2024
1 parent 5e14cd4 commit 1d9c1ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.1.4 - 2024-07-19

### Fixed
- Bug with ZIndex

# 0.1.3 - 2024-05-25

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import WinMB from '@skwalexe/winmb'
If you use this method, the library will be available globally as `WinMB`.

```js
<script src="https://cdn.jsdelivr.net/npm/@skwalexe/[email protected].3/dist/winmb.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@skwalexe/[email protected].4/dist/winmb.umd.js"></script>
```

# Using this library 📦
Expand All @@ -58,7 +58,7 @@ This library exports a `WinMB` class which acccepts the following parameters:
- `assetsUrl / required`: WinMB needs to load **remote assets** such as css stylesheets, sounds, and images, which you can host on your own servers. This parameter is used to tell WinMB where it can find these assets. You must provide a **base url**, to which WinMB will just append the requested asset's file name. If you don't want to host the assets yourself, you can use JSDelivr like in the example below.

```js
const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/[email protected].3/src/assets/')
const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/[email protected].4/src/assets/')
```

Once you instanciated the `WinMB` class, it exposes the follwing methods:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@skwalexe/winmb",
"version": "0.1.3",
"version": "0.1.4",
"description": "Windows-like dialogue boxes for your website",
"main": "./dist/lib-cjs/main.js",
"module": "./dist/lib-esm/main.js",
Expand Down Expand Up @@ -46,9 +46,9 @@
"build:cjs": "tsc -m commonjs --target es2017 --outDir ./dist/lib-cjs/",
"build:esm": "tsc -m es6 --target es2017 --outDir ./dist/lib-esm/",
"build:umd": "rollup -c",
"watch-esm": "pnpm run build:esm -- --watch",
"watch-umd": "pnpm run build:umd -- --watch --plugin rollup-plugin-serve --plugin rollup-plugin-livereload",
"serve": "concurrently 'pnpm:watch-esm' 'pnpm:watch-umd'",
"watch-esm": "pnpm run build:esm --watch",
"watch-umd": "pnpm run build:umd --watch --plugin rollup-plugin-serve --plugin rollup-plugin-livereload",
"serve": "pnpm run build:esm && concurrently 'pnpm:watch-esm' 'pnpm:watch-umd'",
"build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:umd"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/winmb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class WinMB {
const messageBox = document.createElement('div')
messageBox.classList.add(cssClass)

messageBox.style.zIndex = (this.boxList.length + 1).toString()
messageBox.style.zIndex = (this.boxList.length + 10001).toString()

if (position === 'random')
position = [GetRandomInt(0, window.innerWidth), GetRandomInt(0, window.innerHeight)]
Expand Down

0 comments on commit 1d9c1ea

Please sign in to comment.