Fixed display bug.
This commit is contained in:
parent
be00453f2c
commit
919c8733a0
88
dist/iwmlib.pixi.js
vendored
88
dist/iwmlib.pixi.js
vendored
@ -12441,24 +12441,28 @@
|
|||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.options = Object.assign({}, {
|
this.options = Object.assign({}, {
|
||||||
"boxWidth": 100,
|
boxWidth: 100,
|
||||||
"boxHeight": 100,
|
boxHeight: 100,
|
||||||
"scrollbarSize": 10,
|
scrollbarSize: 10,
|
||||||
"scrollbarBackground": 14540253,
|
scrollbarBackground: 14540253,
|
||||||
"scrollbarBackgroundAlpha": 1,
|
scrollbarBackgroundAlpha: 1,
|
||||||
"scrollbarForeground": 8947848,
|
scrollbarForeground: 8947848,
|
||||||
"scrollbarForegroundAlpha": 1,
|
scrollbarForegroundAlpha: 1,
|
||||||
"dragScroll": true,
|
dragScroll: true,
|
||||||
"stopPropagation": true,
|
stopPropagation: true,
|
||||||
"scrollbarOffsetHorizontal": 0,
|
scrollbarOffsetHorizontal: 0,
|
||||||
"scrollbarOffsetVertical": 0,
|
scrollbarOffsetVertical: 0,
|
||||||
"underflow": "top-left",
|
underflow: 'top-left',
|
||||||
"fadeScrollbar": false,
|
fadeScrollbar: false,
|
||||||
"fadeWait": 3000,
|
fadeWait: 3000,
|
||||||
"fadeEase": "easeInOutSine"
|
fadeEase: 'easeInOutSine'
|
||||||
}, options);
|
}, options);
|
||||||
this.ease = new PIXI.extras.Ease.list();
|
this.ease = new PIXI.extras.Ease.list();
|
||||||
|
|
||||||
|
this.on('added', event => {
|
||||||
|
this.update();
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* content in placed in here
|
* content in placed in here
|
||||||
* you can use any function from pixi-viewport on content to manually move the content (see https://davidfig.github.io/pixi-viewport/jsdoc/)
|
* you can use any function from pixi-viewport on content to manually move the content (see https://davidfig.github.io/pixi-viewport/jsdoc/)
|
||||||
@ -12996,39 +13000,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for the switch action.
|
* Class that represents a PixiJS Scrollview.
|
||||||
*
|
|
||||||
* @callback actionCallback
|
|
||||||
* @param {object} event - The event object.
|
|
||||||
* @param {Switch} switch - A reference to the switch (also this refers to the switch).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback for the switch action.
|
|
||||||
*
|
|
||||||
* @callback actionActiveCallback
|
|
||||||
* @param {object} event - The event object.
|
|
||||||
* @param {Switch} switch - A reference to the switch (also this refers to the switch).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback for the switch beforeAction.
|
|
||||||
*
|
|
||||||
* @callback beforeActionCallback
|
|
||||||
* @param {object} event - The event object.
|
|
||||||
* @param {Switch} switch - A reference to the switch (also this refers to the switch).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback for the switch afterAction.
|
|
||||||
*
|
|
||||||
* @callback afterActionCallback
|
|
||||||
* @param {object} event - The event object.
|
|
||||||
* @param {Switch} switch - A reference to the switch (also this refers to the switch).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class that represents a PixiJS Switch.
|
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* // Create the app
|
* // Create the app
|
||||||
@ -13038,14 +13010,14 @@
|
|||||||
* height: 250
|
* height: 250
|
||||||
* }).setup().run()
|
* }).setup().run()
|
||||||
*
|
*
|
||||||
* // Create the switch
|
* // Create the Scrollview
|
||||||
* const switch1 = new Switch({
|
* app.loader
|
||||||
* x: 10,
|
* .add('elephant', './assets/elephant-1.jpg')
|
||||||
* y: 20
|
* .load((loader, resources) => {
|
||||||
* })
|
* const sprite = new PIXI.Sprite(resources.elephant.texture)
|
||||||
*
|
* const scrollview = new Scrollview({boxWidth: 400, boxHeight: 180})
|
||||||
* // Add the switch to a DisplayObject
|
* scrollview.content.addChild(sprite)
|
||||||
* app.scene.addChild(switch1)
|
* app.scene.addChild(scrollview)
|
||||||
*
|
*
|
||||||
* @class
|
* @class
|
||||||
* @extends PIXI.extras.Scrollbox
|
* @extends PIXI.extras.Scrollbox
|
||||||
@ -13055,7 +13027,7 @@
|
|||||||
class Scrollview extends Scrollbox {
|
class Scrollview extends Scrollbox {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an instance of a Switch.
|
* Creates an instance of a Scrollview.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
@ -13092,6 +13064,8 @@
|
|||||||
*/
|
*/
|
||||||
layout() {
|
layout() {
|
||||||
|
|
||||||
|
this.update();
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,24 +30,28 @@ export default class Scrollbox extends PIXI.Container {
|
|||||||
{
|
{
|
||||||
super()
|
super()
|
||||||
this.options = Object.assign({}, {
|
this.options = Object.assign({}, {
|
||||||
"boxWidth": 100,
|
boxWidth: 100,
|
||||||
"boxHeight": 100,
|
boxHeight: 100,
|
||||||
"scrollbarSize": 10,
|
scrollbarSize: 10,
|
||||||
"scrollbarBackground": 14540253,
|
scrollbarBackground: 14540253,
|
||||||
"scrollbarBackgroundAlpha": 1,
|
scrollbarBackgroundAlpha: 1,
|
||||||
"scrollbarForeground": 8947848,
|
scrollbarForeground: 8947848,
|
||||||
"scrollbarForegroundAlpha": 1,
|
scrollbarForegroundAlpha: 1,
|
||||||
"dragScroll": true,
|
dragScroll: true,
|
||||||
"stopPropagation": true,
|
stopPropagation: true,
|
||||||
"scrollbarOffsetHorizontal": 0,
|
scrollbarOffsetHorizontal: 0,
|
||||||
"scrollbarOffsetVertical": 0,
|
scrollbarOffsetVertical: 0,
|
||||||
"underflow": "top-left",
|
underflow: 'top-left',
|
||||||
"fadeScrollbar": false,
|
fadeScrollbar: false,
|
||||||
"fadeWait": 3000,
|
fadeWait: 3000,
|
||||||
"fadeEase": "easeInOutSine"
|
fadeEase: 'easeInOutSine'
|
||||||
}, options)
|
}, options)
|
||||||
this.ease = new PIXI.extras.Ease.list()
|
this.ease = new PIXI.extras.Ease.list()
|
||||||
|
|
||||||
|
this.on('added', event => {
|
||||||
|
this.update()
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* content in placed in here
|
* content in placed in here
|
||||||
* you can use any function from pixi-viewport on content to manually move the content (see https://davidfig.github.io/pixi-viewport/jsdoc/)
|
* you can use any function from pixi-viewport on content to manually move the content (see https://davidfig.github.io/pixi-viewport/jsdoc/)
|
||||||
|
@ -65,6 +65,8 @@ export default class Scrollview extends Scrollbox {
|
|||||||
*/
|
*/
|
||||||
layout() {
|
layout() {
|
||||||
|
|
||||||
|
this.update()
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user