Fixed display bug.

This commit is contained in:
2019-05-14 14:13:37 +02:00
parent be00453f2c
commit 919c8733a0
3 changed files with 52 additions and 72 deletions
+19 -15
View File
@@ -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/)
+2
View File
@@ -65,6 +65,8 @@ export default class Scrollview extends Scrollbox {
*/
layout() {
this.update()
return this
}
}