aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-27 17:37:26 +0200
committerChocobozzz <me@florianbigard.com>2018-03-27 17:37:26 +0200
commita86887a4b8f1055e184508ff284f16e036cdd907 (patch)
tree7dc6824ec5686ec3b61b95e4b9193875a587725b /client/src/app/shared
parent5b5e333f068c7bd5fcf519bcd3f687eb46221883 (diff)
downloadPeerTube-a86887a4b8f1055e184508ff284f16e036cdd907.tar.gz
PeerTube-a86887a4b8f1055e184508ff284f16e036cdd907.tar.zst
PeerTube-a86887a4b8f1055e184508ff284f16e036cdd907.zip
Fix my videos pagination
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 90a88544a..021c285c0 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -169,6 +169,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
169 this.videoPages = Object.values(this.loadedPages) 169 this.videoPages = Object.values(this.loadedPages)
170 } 170 }
171 171
172 protected buildVideoHeight () {
173 // Same ratios than base width/height
174 return this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)
175 }
176
172 private minPageLoaded () { 177 private minPageLoaded () {
173 return Math.min(...Object.keys(this.loadedPages).map(e => parseInt(e, 10))) 178 return Math.min(...Object.keys(this.loadedPages).map(e => parseInt(e, 10)))
174 } 179 }
@@ -183,8 +188,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
183 188
184 // Video takes all the width 189 // Video takes all the width
185 this.videoWidth = -1 190 this.videoWidth = -1
186 // Same ratios than base width/height 191 this.videoHeight = this.buildVideoHeight()
187 this.videoHeight = this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)
188 this.pageHeight = this.pagination.itemsPerPage * this.videoHeight 192 this.pageHeight = this.pagination.itemsPerPage * this.videoHeight
189 } else { 193 } else {
190 this.videoWidth = this.baseVideoWidth 194 this.videoWidth = this.baseVideoWidth