Refactored resize observer

This commit is contained in:
squidfunk 2020-12-30 18:40:34 +01:00
parent a339a8afb6
commit b825d222a4
7 changed files with 7 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"assets/javascripts/bundle.js": "assets/javascripts/bundle.15ed33ca.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.15ed33ca.min.js.map",
"assets/javascripts/bundle.js": "assets/javascripts/bundle.bf7b0f12.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.bf7b0f12.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.08c56446.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.08c56446.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.8c7e0a7e.min.js",

View File

@ -185,7 +185,7 @@
</div>
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.08c56446.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.15ed33ca.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.bf7b0f12.min.js' | url }}"></script>
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",

View File

@ -26,7 +26,6 @@ import {
Observable,
Subject,
defer,
merge,
of
} from "rxjs"
import {
@ -77,7 +76,7 @@ const observer$ = defer(() => of(
})
))
.pipe(
switchMap(resize => merge(of(resize), NEVER)
switchMap(resize => NEVER.pipe(startWith(resize))
.pipe(
finalize(() => resize.disconnect())
)