From a4d2290274941eeac92e5529899695f04d5e1a4e Mon Sep 17 00:00:00 2001 From: Jamie V Date: Thu, 29 Sep 2022 20:13:33 -0700 Subject: [PATCH] adding dynamce class for scrolling the embeds wrapper based on need --- .../notebook/components/NotebookEntry.vue | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/plugins/notebook/components/NotebookEntry.vue b/src/plugins/notebook/components/NotebookEntry.vue index b10ad35ea8..dbcae32e45 100644 --- a/src/plugins/notebook/components/NotebookEntry.vue +++ b/src/plugins/notebook/components/NotebookEntry.vue @@ -91,9 +91,14 @@ @tags-updated="timestampAndUpdate" /> -
+
{ + return embed.$el.clientWidth + total; + }, 0); + + this.enableEmbedsWrapperScroll = embedsTotalWidth > embedsWrapperLength; + } + + }, async dropOnEntry($event) { $event.stopImmediatePropagation(); @@ -326,6 +364,8 @@ export default { this.entry.embeds.splice(embedPosition, 1); this.timestampAndUpdate(); + + this.manageEmbedLayout(); }, updateEmbed(newEmbed) { this.entry.embeds.some(e => {