Prettified all files.

This commit is contained in:
2019-07-18 12:26:39 +02:00
parent 7744b92771
commit 2d400a18ec
125 changed files with 11184 additions and 8154 deletions
+26 -27
View File
@@ -1443,7 +1443,7 @@ import AbstractPopup from './abstractpopup.js'
/**
* Class that represents a PixiJS Tooltip.
*
*
* @example
* // Create the app
* const app = new PIXIApp({
@@ -1451,13 +1451,13 @@ import AbstractPopup from './abstractpopup.js'
* width: 900,
* height: 250
* }).setup().run()
*
*
* // Add an DisplayObject to the app
* const circle = new PIXI.Graphics()
* circle.beginFill(0x5251a3)
* circle.drawCircle(50, 50, 40)
* app.scene.addChild(circle)
*
*
* const tooltip = new Tooltip({
* object: circle,
* container: app.scene,
@@ -1469,10 +1469,9 @@ import AbstractPopup from './abstractpopup.js'
* @see {@link https://www.iwm-tuebingen.de/iwmbrowser/lib/pixi/tooltip.html|DocTest}
*/
export default class Tooltip extends AbstractPopup {
/**
* Creates an instance of a Tooltip.
*
*
* @constructor
* @param {object} [opts] - An options object to specify to style and behaviour of the tooltip.
* @param {number} [opts.minWidth=0] - The minimum width of the tooltip.
@@ -1485,19 +1484,22 @@ export default class Tooltip extends AbstractPopup {
* @param {number} [opts.delay=0] - A delay, after which the tooltip should be opened.
*/
constructor(opts = {}) {
const theme = Theme.fromString(opts.theme)
opts = Object.assign({}, {
minWidth: 0,
minHeight: 0,
padding: theme.padding / 2,
object: null,
container: null,
offsetLeft: 8,
offsetTop: -8,
delay: 0
}, opts)
opts = Object.assign(
{},
{
minWidth: 0,
minHeight: 0,
padding: theme.padding / 2,
object: null,
container: null,
offsetLeft: 8,
offsetTop: -8,
delay: 0
},
opts
)
opts.container = opts.container || opts.object
@@ -1511,15 +1513,14 @@ export default class Tooltip extends AbstractPopup {
//-----------------
this.layout()
}
/**
* Creates children and instantiates everything.
*
*
* @private
* @return {Tooltip} A reference to the tooltip for chaining.
*/
setup() {
super.setup()
// bind events this
@@ -1527,7 +1528,7 @@ export default class Tooltip extends AbstractPopup {
this.interactive = true
let mouseoverTooltip = false
this.on('mouseover', e => {
mouseoverTooltip = true
})
@@ -1540,7 +1541,7 @@ export default class Tooltip extends AbstractPopup {
})
}
})
// bind events object
//-----------------
const object = this.opts.object
@@ -1549,7 +1550,6 @@ export default class Tooltip extends AbstractPopup {
let mouseoverObject = false
object.on('mouseover', e => {
this.timeout = window.setTimeout(() => {
mouseoverObject = true
this.visible = true
@@ -1576,15 +1576,14 @@ export default class Tooltip extends AbstractPopup {
return this
}
/**
* Calculates and sets the position of the tooltip.
*
*
* @private
* @return {Tooltip} A reference to the tooltip for chaining.
*/
setPosition(e) {
const position = e.data.getLocalPosition(this.opts.container)
this.x = position.x + this.opts.offsetLeft
@@ -1606,7 +1605,7 @@ export default class Tooltip extends AbstractPopup {
<footer class="content-size">
<div class="footer">
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)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Jul 18 2019 12:16:18 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>