Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/widgets

 Conflicts:
	src/resizer/distributors/collapse.ts
	src/resizer/distributors/fixed.ts
	src/resizer/index.ts
	src/resizer/item.ts
	src/resizer/resizer.ts
	src/resizer/sizer.ts
This commit is contained in:
Michael Telatynski
2020-10-21 09:56:22 +01:00
17 changed files with 66 additions and 75 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
/*
Copyright 2018 New Vector Ltd
Copyright 2018 - 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -57,13 +57,13 @@ export default class Sizer {
}
/** @return {number} container offset to document */
private getPageOffset() {
private getPageOffset(): number {
let element = this.container;
let offset = 0;
while (element) {
const pos = this.vertical ? element.offsetTop : element.offsetLeft;
offset = offset + pos;
element = element.offsetParent as HTMLElement;
element = <HTMLElement>element.offsetParent;
}
return offset;
}