Skip to content

Commit

Permalink
fix: 🐛 fix scroller content size when not autoResize
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector committed Jun 7, 2021
1 parent 306d6eb commit 1a77b44
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/x6/src/addon/scroller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ export class Scroller extends View {
}

this.backgroundManager = new Scroller.Background(this)

if (!this.options.autoResize) {
this.update()
}
}

protected startListening() {
Expand Down Expand Up @@ -420,6 +424,10 @@ export class Scroller extends View {
options.padding *= sx
}

if (!this.options.autoResize) {
options.contentArea = Rectangle.create()
}

return options
}

Expand Down

0 comments on commit 1a77b44

Please sign in to comment.