Skip to content

Commit

Permalink
Interpunction and ie edge banner fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AleBles committed Dec 18, 2019
1 parent 238df20 commit 6d7f8cf
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 45 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.4.5] - 2019-12-17
## Fixed
- Disallowed double calling of alignIn for GD banner
- Check for parent div on banner resize


## [0.4.4] - 2019-12-02
Expand Down
92 changes: 54 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^7.6.0",
"@types/jest": "^23.3.2",
"@types/node": "^10.17.5",
"@types/node": "^10.17.11",
"colors": "^1.4.0",
"commitizen": "^4.0.3",
"coveralls": "^3.0.7",
"coveralls": "^3.0.9",
"cross-env": "^5.2.1",
"cz-conventional-changelog": "^2.1.0",
"husky": "^1.0.1",
Expand All @@ -125,8 +125,8 @@
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.15.0",
"tslint-config-standard": "^8.0.1",
"typedoc": "^0.15.2",
"typescript": "^3.7.2"
"typedoc": "^0.15.5",
"typescript": "^3.7.3"
},
"dependencies": {
"eventemitter3": "^3.1.2"
Expand Down
11 changes: 8 additions & 3 deletions src/Providers/gamedistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ export class GameDistributionBanner {

public destroy(): void {
document.body.removeChild(this.element)
delete this.element
delete this.parent
delete this.alignment

if (this.resizeListener) {
window.removeEventListener('resize', this.resizeListener)
}

delete this.element
delete this.parent
delete this.alignment
}

public alignIn(element: HTMLElement, position: GameDistributionAlignment): void {
Expand All @@ -99,6 +100,10 @@ export class GameDistributionBanner {
}

private resize(): void {
if (!this.parent) {
return
}

const parentBoundingRect: ClientRect = this.parent.getBoundingClientRect()

switch (this.alignment) {
Expand Down

0 comments on commit 6d7f8cf

Please sign in to comment.