Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
milkamil93 committed Aug 5, 2021
1 parent 4b478d4 commit d89e167
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mobile-swipe-menu",
"description": "Swipe Menu with Vanilla JS for mobile",
"version": "2.1.2",
"version": "2.2.0",
"homepage": "https://github.com/milkamil93/mobile-swipe-menu",
"main": "index.js",
"author": "milkamil93",
Expand Down
6 changes: 3 additions & 3 deletions src/js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ export default class
this._element.style.zIndex = '1000'
this._element.style.position = 'fixed'
this._windowWidth = window.innerWidth - this._getScrollWidth()
this._width = this._width || this._windowWidth
this._element.style.width = this._width + 'px'
this._element.style[this._mode] = -this._width + 'px'
this.setWidth(this._width || this._windowWidth)
}

/**
Expand Down Expand Up @@ -479,5 +477,7 @@ export default class
setWidth (width = 0)
{
this._width = width
this._element.style.width = this._width + 'px'
this._element.style[this._mode] = -this._width + 'px'
}
}

0 comments on commit d89e167

Please sign in to comment.