1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Fix new logo related errors

Fixed logo deallocation related bugs, had to patch the logo repo itself to add a stopAnimating method.

Also tuned up the logo to more closely resemble the old behavior.
- Overlaps the title text
- Points nose at cursor, not just front of eyes
- Cursor is more "distant" from fox, to avoid extreme angles on edges.
This commit is contained in:
Dan Finlay 2016-09-08 15:38:47 -07:00
parent 1f0b2ca787
commit 6c05c221cd
3 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -51,7 +51,7 @@
"inject-css": "^0.1.1", "inject-css": "^0.1.1",
"jazzicon": "^1.1.3", "jazzicon": "^1.1.3",
"menu-droppo": "^1.1.0", "menu-droppo": "^1.1.0",
"metamask-logo": "^2.0.0", "metamask-logo": "^2.1.1",
"mississippi": "^1.2.0", "mississippi": "^1.2.0",
"multiplex": "^6.7.0", "multiplex": "^6.7.0",
"once": "^1.3.3", "once": "^1.3.3",

View File

@ -26,7 +26,9 @@ Mascot.prototype.render = function () {
// and we dont get that until render // and we dont get that until render
this.handleAnimationEvents() this.handleAnimationEvents()
return h('#metamask-mascot-container') return h('#metamask-mascot-container', {
style: { zIndex: 2 },
})
} }
Mascot.prototype.componentDidMount = function () { Mascot.prototype.componentDidMount = function () {
@ -36,12 +38,13 @@ Mascot.prototype.componentDidMount = function () {
} }
Mascot.prototype.componentWillUnmount = function () { Mascot.prototype.componentWillUnmount = function () {
if (!this.logo.webGLSupport) return this.animations = this.props.animationEventEmitter
this.animations.removeAllListeners()
this.logo.container.remove() this.logo.container.remove()
this.logo.stopAnimation()
} }
Mascot.prototype.handleAnimationEvents = function () { Mascot.prototype.handleAnimationEvents = function () {
if (!this.logo.webGLSupport) return
// only setup listeners once // only setup listeners once
if (this.animations) return if (this.animations) return
this.animations = this.props.animationEventEmitter this.animations = this.props.animationEventEmitter