aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/mascot.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-08-24 05:11:25 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-08-24 05:11:25 +0800
commit5168232481849019d00756139b3cfc7b6a93a1f3 (patch)
tree490c0050692c173795f7af5519f7bea8179b9b00 /ui/app/components/mascot.js
parentcec88cc9acb4711c8227502f3477a55b3800ea22 (diff)
downloadtangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.tar
tangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.tar.gz
tangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.tar.bz2
tangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.tar.lz
tangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.tar.xz
tangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.tar.zst
tangerine-wallet-browser-5168232481849019d00756139b3cfc7b6a93a1f3.zip
Created option to pass in static file for fallback for logo.
Diffstat (limited to 'ui/app/components/mascot.js')
-rw-r--r--ui/app/components/mascot.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/components/mascot.js b/ui/app/components/mascot.js
index b13e130c2..28a6e735f 100644
--- a/ui/app/components/mascot.js
+++ b/ui/app/components/mascot.js
@@ -14,7 +14,9 @@ function Mascot () {
pxNotRatio: true,
width: 200,
height: 200,
+ staticImage: './images/icon-512.png'
})
+ debugger;
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)
@@ -46,12 +48,12 @@ Mascot.prototype.componentDidMount = function () {
}
Mascot.prototype.componentWillUnmount = function () {
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
this.logo.canvas.remove()
}
Mascot.prototype.handleAnimationEvents = function () {
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
// only setup listeners once
if (this.animations) return
this.animations = this.props.animationEventEmitter
@@ -60,7 +62,7 @@ Mascot.prototype.handleAnimationEvents = function () {
}
Mascot.prototype.lookAt = function (target) {
- if (!this.logo) return
+ if (!this.logo.webGLSupport) return
this.unfollowMouse()
this.logo.lookAt(target)
this.refollowMouse()