Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 06b88a6

Browse files
authored
fix: DEV-2462: Changing label (#675)
* fix: DEV-2462: audio name * fix: DEV-2462: changing label * fix: DEV-2462: checkout view
1 parent ebb08ce commit 06b88a6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/regions/AudioRegion.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,16 @@ const Model = types
113113
const el = self.wsRegionElement(wsRegion);
114114

115115
if (!el) return;
116-
const classes = [el.className, "htx-highlight", "htx-highlight-last"];
116+
117+
const lastClassList = el.className.split(' ');
118+
119+
for(const obj in lastClassList){
120+
if(lastClassList[obj].indexOf('htx-label') >= 0){
121+
lastClassList.splice(obj, 1);
122+
}
123+
}
124+
125+
const classes = [...new Set([...lastClassList, "htx-highlight", "htx-highlight-last"])];
117126

118127
if (!self.parent.showlabels && !settings.showLabels) {
119128
classes.push("htx-no-label");
@@ -125,6 +134,7 @@ const Model = types
125134

126135
classes.push(cssCls);
127136
}
137+
128138
el.className = classes.filter(Boolean).join(" ");
129139
},
130140

0 commit comments

Comments
 (0)