summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfuyu <54523771+mfmfuyu@users.noreply.github.com>2020-02-05 07:54:49 +0900
committerGitHub <noreply@github.com>2020-02-05 07:54:49 +0900
commit8e21458e16088fcb8fc58aae638c9ee5309bc65f (patch)
tree834f8cef22e69f4fd259d1b9ff41c6d40f982a17 /src
parentFix #5798 (#5816) (diff)
downloadmisskey-8e21458e16088fcb8fc58aae638c9ee5309bc65f.tar.gz
misskey-8e21458e16088fcb8fc58aae638c9ee5309bc65f.tar.bz2
misskey-8e21458e16088fcb8fc58aae638c9ee5309bc65f.zip
コンポーネントの活性時に再計算するように (#5829)
Diffstat (limited to 'src')
-rw-r--r--src/client/directives/size.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/directives/size.ts b/src/client/directives/size.ts
index c7d797e5ae..7c4254566c 100644
--- a/src/client/directives/size.ts
+++ b/src/client/directives/size.ts
@@ -1,5 +1,5 @@
export default {
- inserted(el, binding) {
+ inserted(el, binding, vn) {
const query = binding.value;
/*
@@ -31,7 +31,7 @@ export default {
const calc = () => {
const width = el.clientWidth;
-
+
for (const q of query) {
if (q.max) {
if (width <= q.max) {
@@ -55,6 +55,7 @@ export default {
el._sizeResizeCb_ = calc;
window.addEventListener('resize', calc);
+ vn.context.$on('hook:activated', calc);
},
unbind(el, binding, vn) {