diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-08-20 07:59:04 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-08-20 07:59:04 +0800 |
commit | 7a466697d30019a4a1703a19b60ecc78fd063f5d (patch) | |
tree | bf24455580e0ffd71cb03c58fa08c6b0d9ab8362 | |
parent | 43e28788d7763de61d5190e8cca406077b8bdd9a (diff) | |
download | tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.tar tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.tar.gz tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.tar.bz2 tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.tar.lz tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.tar.xz tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.tar.zst tangerine-wallet-browser-7a466697d30019a4a1703a19b60ecc78fd063f5d.zip |
Modify logic for component update.
-rw-r--r-- | ui/app/components/mascot.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/app/components/mascot.js b/ui/app/components/mascot.js index e99720e1b..b13e130c2 100644 --- a/ui/app/components/mascot.js +++ b/ui/app/components/mascot.js @@ -15,7 +15,7 @@ function Mascot () { width: 200, height: 200, }) - if (!this.logo) return + if (!this.logo.webGLSupport) return this.refollowMouse = debounce(this.logo.setFollowMouse.bind(this.logo, true), 1000) this.unfollowMouse = this.logo.setFollowMouse.bind(this.logo, false) } @@ -36,10 +36,9 @@ Mascot.prototype.render = function () { Mascot.prototype.componentDidMount = function () { var targetDivId = 'metamask-mascot-container' var container = document.getElementById(targetDivId) - if (!this.logo) { - var staticLogo = document.createElement('img') - staticLogo.src = 'images/icon-128.png' - staticLogo.style.marginBottom = '20px' + if (!this.logo.webGLSupport) { + var staticLogo = this.logo.staticLogo + staticLogo.style.marginBottom = '40px' container.appendChild(staticLogo) } else { container.appendChild(this.logo.canvas) |