Commit 19056cab authored by liujiangnan's avatar liujiangnan

style:

parent 3f1b1d59
......@@ -585,13 +585,13 @@ html, body {
/* 锁定状态下的标记样式 */
.wavesurfer-region[data-id$="-start"] {
background-color: rgba(0, 255, 0, 0.8) !important;
width: 1px !important;
/* width: 1px !important; */
z-index: 5 !important;
}
.wavesurfer-region[data-id$="-end"] {
background-color: rgba(255, 0, 0, 0.8) !important;
width: 1px !important;
/* width: 1px !important; */
z-index: 5 !important;
}
......
......@@ -1272,7 +1272,7 @@ new Vue({
const startMarker = this.wavesurfer.addRegion({
id: `${pageRegionId}-start`,
start: this.lockedPageStart,
end: this.lockedPageStart + 0.0001,
end: this.lockedPageStart + 0.000001, // 使用更小的差值
color: 'rgba(0, 255, 0, 0.8)',
drag: false,
resize: false
......@@ -1281,7 +1281,7 @@ new Vue({
// 创建结束标记(红色竖线)
const endMarker = this.wavesurfer.addRegion({
id: `${pageRegionId}-end`,
start: this.lockedPageEnd - 0.0001,
start: this.lockedPageEnd - 0.000001, // 使用更小的差值
end: this.lockedPageEnd,
color: 'rgba(255, 0, 0, 0.8)',
drag: false,
......@@ -1291,6 +1291,22 @@ new Vue({
if (startMarker && endMarker) {
this.audioRegions[`${pageRegionId}-start`] = startMarker;
this.audioRegions[`${pageRegionId}-end`] = endMarker;
// 添加样式以确保1px宽度
this.$nextTick(() => {
const startElement = startMarker.element;
const endElement = endMarker.element;
if (startElement) {
// startElement.style.width = '1px';
startElement.style.transform = 'translateX(-0.5px)';
}
if (endElement) {
// endElement.style.width = '1px';
endElement.style.transform = 'translateX(-0.5px)';
}
});
}
// 重新创建组区间
......@@ -1393,15 +1409,31 @@ new Vue({
if (startMarker) {
startMarker.update({
start: this.currentPage.start,
end: this.currentPage.start + 0.0001
end: this.currentPage.start + 0.000001
});
// 重新应用样式
this.$nextTick(() => {
if (startMarker.element) {
startMarker.element.style.width = '1px';
startMarker.element.style.transform = 'translateX(-0.5px)';
}
});
}
if (endMarker) {
endMarker.update({
start: this.currentPage.end - 0.0001,
start: this.currentPage.end - 0.000001,
end: this.currentPage.end
});
// 重新应用样式
this.$nextTick(() => {
if (endMarker.element) {
endMarker.element.style.width = '1px';
endMarker.element.style.transform = 'translateX(-0.5px)';
}
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment