Fixed eslint problems

This commit is contained in:
Uwe Oestermeier 2019-07-02 10:06:23 +02:00
parent 1480ad8145
commit 8a4f64f545

View File

@ -1,3 +1,4 @@
/* global PIXI TweenLite */
import Theme from './theme.js'
import Tooltip from './tooltip.js'
import Badge from './badge.js'
@ -160,7 +161,7 @@ export default class Button extends PIXI.Container {
}
if (this.opts.style === 'link') {
Object.assign(this.opts, {strokeAlpha: 0, strokeActiveAlpha: 0, fillAlpha: 0, fillActiveAlpha: 0})
Object.assign(this.opts, { strokeAlpha: 0, strokeActiveAlpha: 0, fillAlpha: 0, fillActiveAlpha: 0 })
}
this._active = null
@ -232,7 +233,7 @@ export default class Button extends PIXI.Container {
//-----------------
this.button.on('pointerover', e => {
this.capture(e)
TweenLite.to([this.button, this.content], this.theme.fast, {alpha: .83, overwrite: 'none'})
TweenLite.to([this.button, this.content], this.theme.fast, { alpha: .83, overwrite: 'none' })
})
this.button.on('pointermove', e => {
@ -241,12 +242,13 @@ export default class Button extends PIXI.Container {
this.button.on('pointerout', e => {
this.capture(e)
TweenLite.to([this.button, this.content], this.theme.fast, {alpha: 1, overwrite: 'none'})
TweenLite.to([this.button, this.content], this.theme.fast, { alpha: 1, overwrite: 'none' })
})
// eslint-disable-next-line no-unused-vars
this.button.on('pointerdown', e => {
//this.capture(e)
TweenLite.to([this.button, this.content], this.theme.fast, {alpha: .7, overwrite: 'none'})
TweenLite.to([this.button, this.content], this.theme.fast, { alpha: .7, overwrite: 'none' })
})
this.button.on('pointerup', e => {
@ -259,7 +261,7 @@ export default class Button extends PIXI.Container {
this.opts.action.call(this, e, this)
}
TweenLite.to([this.button, this.content], this.theme.fast, {alpha: .83, overwrite: 'none'})
TweenLite.to([this.button, this.content], this.theme.fast, { alpha: .83, overwrite: 'none' })
if (this.opts.type === 'checkbox') {
this.active = !this.active
@ -282,9 +284,9 @@ export default class Button extends PIXI.Container {
//-----------------
if (this.opts.tooltip) {
if (typeof this.opts.tooltip === 'string') {
this.tooltip = new Tooltip({object: this, content: this.opts.tooltip})
this.tooltip = new Tooltip({ object: this, content: this.opts.tooltip })
} else {
this.opts.tooltip = Object.assign({}, {object: this}, this.opts.tooltip)
this.opts.tooltip = Object.assign({}, { object: this }, this.opts.tooltip)
this.tooltip = new Tooltip(this.opts.tooltip)
}
}
@ -299,7 +301,7 @@ export default class Button extends PIXI.Container {
offsetTop: 0
})
if (typeof this.opts.badge === 'string') {
opts = Object.assign(opts, {content: this.opts.badge})
opts = Object.assign(opts, { content: this.opts.badge })
} else {
opts = Object.assign(opts, this.opts.badge)
}