Fixed display bug.
This commit is contained in:
+19
-15
@@ -30,24 +30,28 @@ export default class Scrollbox extends PIXI.Container {
|
||||
{
|
||||
super()
|
||||
this.options = Object.assign({}, {
|
||||
"boxWidth": 100,
|
||||
"boxHeight": 100,
|
||||
"scrollbarSize": 10,
|
||||
"scrollbarBackground": 14540253,
|
||||
"scrollbarBackgroundAlpha": 1,
|
||||
"scrollbarForeground": 8947848,
|
||||
"scrollbarForegroundAlpha": 1,
|
||||
"dragScroll": true,
|
||||
"stopPropagation": true,
|
||||
"scrollbarOffsetHorizontal": 0,
|
||||
"scrollbarOffsetVertical": 0,
|
||||
"underflow": "top-left",
|
||||
"fadeScrollbar": false,
|
||||
"fadeWait": 3000,
|
||||
"fadeEase": "easeInOutSine"
|
||||
boxWidth: 100,
|
||||
boxHeight: 100,
|
||||
scrollbarSize: 10,
|
||||
scrollbarBackground: 14540253,
|
||||
scrollbarBackgroundAlpha: 1,
|
||||
scrollbarForeground: 8947848,
|
||||
scrollbarForegroundAlpha: 1,
|
||||
dragScroll: true,
|
||||
stopPropagation: true,
|
||||
scrollbarOffsetHorizontal: 0,
|
||||
scrollbarOffsetVertical: 0,
|
||||
underflow: 'top-left',
|
||||
fadeScrollbar: false,
|
||||
fadeWait: 3000,
|
||||
fadeEase: 'easeInOutSine'
|
||||
}, options)
|
||||
this.ease = new PIXI.extras.Ease.list()
|
||||
|
||||
this.on('added', event => {
|
||||
this.update()
|
||||
})
|
||||
|
||||
/**
|
||||
* 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/)
|
||||
|
||||
@@ -65,6 +65,8 @@ export default class Scrollview extends Scrollbox {
|
||||
*/
|
||||
layout() {
|
||||
|
||||
this.update()
|
||||
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user