Refactored element observables, removed memleaks

This commit is contained in:
squidfunk
2020-08-22 17:58:54 +02:00
parent 989b8597c5
commit 8a6b89ffe1
3 changed files with 73 additions and 17 deletions

View File

@@ -21,7 +21,7 @@
*/
import { Observable, fromEvent, merge } from "rxjs"
import { map, shareReplay, startWith } from "rxjs/operators"
import { map, startWith } from "rxjs/operators"
/* ----------------------------------------------------------------------------
* Types
@@ -71,7 +71,6 @@ export function watchElementOffset(
)
.pipe(
map(() => getElementOffset(el)),
startWith(getElementOffset(el)),
shareReplay(1)
startWith(getElementOffset(el))
)
}