Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
quantuminformation committed Mar 19, 2018
1 parent 7b94b53 commit 3462eb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
@@ -1,4 +1,6 @@
<!---
<img src="https://codeship.com/projects/d17a6c50-f8fa-0134-9e36-76184fa5b855/status?branch=master"/>
--->

# Solar-popup

Expand Down
8 changes: 6 additions & 2 deletions src/SolarPopup.ts
Expand Up @@ -31,8 +31,12 @@ export default class SolarPopup implements IComponent {
this.hostElement = tempElement.firstChild as HTMLElement
this.hostElement.querySelector('.childContainer').appendChild(child)
if (fixedDimensions) {
this.hostElement.style.width = `${fixedDimensions.width}px`
this.hostElement.style.height = `${fixedDimensions.height}px`
if (window.innerWidth > 2 * 10 + fixedDimensions.width) {
this.hostElement.style.width = `${fixedDimensions.width}px`
}
if (window.innerHeight > 2 * 10 + fixedDimensions.height) {
this.hostElement.style.height = `${fixedDimensions.height}px`
}
}
}

Expand Down

0 comments on commit 3462eb7

Please sign in to comment.