Skip to content

Commit

Permalink
Merge pull request #19 from ryank109/calc-fix
Browse files Browse the repository at this point in the history
Popup right position calculation fix
  • Loading branch information
ryank109 committed Jul 2, 2017
2 parents 2b2d5da + b07a5d6 commit bce6d9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "react-redux-popup",
"version": "2.1.0",
"version": "2.1.1",
"description": "React redux popup",
"main": "lib/react-redux-popup",
"scripts": {
"clean": "rimraf coverage lib test-reports",
"build": "NODE_ENV=production webpack --config ./configs/webpack.config.js --progress --profile --colors",
"coverage": "./node_modules/jest/bin/jest.js --coverage",
"lint": "eslint src/**",
"prepublishOnly": "npm run clean && rm -rf node_modules && npm cache clean && npm i && npm run build",
"start": "node ./example-app/server.js",
"test": "./node_modules/jest/bin/jest.js",
"test-dev": "./node_modules/jest/bin/jest.js --watch"
Expand Down
5 changes: 3 additions & 2 deletions src/popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ export const HOCPopup = ComposedComponent => {
}

setPopupPosition() {
const popupRect = this.popup.getBoundingClientRect();
const style = getPopupPosition(
this.props.anchor,
this.props.getRect(),
this.popup.clientWidth,
this.popup.clientHeight,
popupRect.width,
popupRect.height,
window.innerWidth,
window.innerHeight,
this.props.offset);
Expand Down

0 comments on commit bce6d9a

Please sign in to comment.