Skip to content

Commit fbdd969

Browse files
Merge pull request #237 from BinaryMan32/edit-lyrics-codemirror-style-perf
EditLyrics: reduce CPU usage
2 parents e426e1e + 31900aa commit fbdd969

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/library/EditLyrics.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,12 @@
9595

9696
<!-- NOTE: AsyncCodemirror component does not have @wheel event handler, so it has to be handled here (in the container) -->
9797
<div class="relative h-full w-full" id="cm-container" ref="cmContainer">
98-
<div class="overflow-hidden absolute w-full" :style="{ height: `${cmHeight}px` }" @wheel="handleWheel">
98+
<div class="overflow-hidden absolute w-full" :style="{ height: `${cmHeight}px`, fontSize: `${codemirrorStyle.fontSize}em` }" @wheel="handleWheel">
9999
<AsyncCodemirror
100100
v-if="shouldLoadCodeMirror"
101101
v-model="unifiedLyrics"
102102
placeholder="Lyrics is currently empty"
103103
class="codemirror-custom h-full outline-none"
104-
:style="{ fontSize: `${codemirrorStyle.fontSize}em` }"
105104
:autofocus="true"
106105
:indent-with-tab="true"
107106
:tab-size="2"

0 commit comments

Comments
 (0)