Generated JSDoc.

This commit is contained in:
2019-07-10 11:55:35 +02:00
parent 44a5b3385c
commit 1c7651f0d5
68 changed files with 221 additions and 234 deletions
+55 -53
View File
@@ -1438,7 +1438,8 @@
</div>
</header>
<article>
<pre id="source-code" class="prettyprint source linenums"><code>import Theme from './theme.js'
<pre id="source-code" class="prettyprint source linenums"><code>/* global PIXI TweenLite */
import Theme from './theme.js'
import Tooltip from './tooltip.js'
import Badge from './badge.js'
import Events from '../events.js'
@@ -1600,7 +1601,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
@@ -1672,7 +1673,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 => {
@@ -1681,12 +1682,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 => {
@@ -1699,7 +1701,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
@@ -1722,9 +1724,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)
}
}
@@ -1739,7 +1741,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)
}
@@ -1747,25 +1749,25 @@ export default class Button extends PIXI.Container {
const badge = new Badge(opts)
switch (opts.align) {
case 'left':
badge.x = this.x - badge.width / 2 + opts.offsetLeft
break
case 'center':
badge.x = this.x + this.width / 2 - badge.width / 2 + opts.offsetLeft
break
case 'right':
badge.x = this.x + this.width - badge.width / 2 + opts.offsetLeft
case 'left':
badge.x = this.x - badge.width / 2 + opts.offsetLeft
break
case 'center':
badge.x = this.x + this.width / 2 - badge.width / 2 + opts.offsetLeft
break
case 'right':
badge.x = this.x + this.width - badge.width / 2 + opts.offsetLeft
}
switch (opts.verticalAlign) {
case 'top':
badge.y = this.y - badge.height / 2 + opts.offsetTop
break
case 'middle':
badge.y = this.y + this.height / 2 - badge.height / 2 + opts.offsetTop
break
case 'bottom':
badge.y = this.y + this.height - badge.height / 2 + opts.offsetTop
case 'top':
badge.y = this.y - badge.height / 2 + opts.offsetTop
break
case 'middle':
badge.y = this.y + this.height / 2 - badge.height / 2 + opts.offsetTop
break
case 'bottom':
badge.y = this.y + this.height - badge.height / 2 + opts.offsetTop
}
this.addChild(badge)
@@ -1875,15 +1877,15 @@ export default class Button extends PIXI.Container {
for (let child of this.content.children) {
switch (this.opts.verticalAlign) {
case 'top':
child.y = 0
break
case 'middle':
child.y = this.content.height / 2 - child.height / 2
break
case 'bottom':
child.y = this.content.height - child.height
break
case 'top':
child.y = 0
break
case 'middle':
child.y = this.content.height / 2 - child.height / 2
break
case 'bottom':
child.y = this.content.height - child.height
break
}
}
@@ -1900,27 +1902,27 @@ export default class Button extends PIXI.Container {
layoutContent() {
switch (this.opts.align) {
case 'left':
this.content.x = this.opts.padding
break
case 'center':
this.content.x = ((this._width - this.content.width) / 2)
break
case 'right':
this.content.x = this._width - this.opts.padding - this.content.width
break
case 'left':
this.content.x = this.opts.padding
break
case 'center':
this.content.x = ((this._width - this.content.width) / 2)
break
case 'right':
this.content.x = this._width - this.opts.padding - this.content.width
break
}
switch (this.opts.verticalAlign) {
case 'top':
this.content.y = this.opts.padding
break
case 'middle':
this.content.y = (this._height - this.content.height) / 2
break
case 'bottom':
this.content.y = this._height - this.opts.padding - this.content.height
break
case 'top':
this.content.y = this.opts.padding
break
case 'middle':
this.content.y = (this._height - this.content.height) / 2
break
case 'bottom':
this.content.y = this._height - this.opts.padding - this.content.height
break
}
return this
@@ -2118,7 +2120,7 @@ export default class Button extends PIXI.Container {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Tue May 14 2019 14:29:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Wed Jul 10 2019 11:54:25 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>