fix: 调整图文工具栏布局,解决顶部遮挡问题,图片透明度滑块添加百分比
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
const textTools = document.getElementById('textTools');
|
||||
const imageTools = document.getElementById('imageTools');
|
||||
const opacitySlider = document.getElementById('opacitySlider');
|
||||
const opacityValue = document.getElementById('opacityValue');
|
||||
const boldBtn = document.getElementById('boldBtn');
|
||||
const italicBtn = document.getElementById('italicBtn');
|
||||
const colorPicker = document.getElementById('colorPicker');
|
||||
@@ -108,6 +109,7 @@
|
||||
opacitySlider.addEventListener('input', (e) => {
|
||||
if (selectedOverlay) {
|
||||
selectedOverlay.style.opacity = e.target.value / 100;
|
||||
opacityValue.textContent = e.target.value + '%';
|
||||
}
|
||||
});
|
||||
|
||||
@@ -525,6 +527,7 @@
|
||||
// 更新透明度滑块为当前层叠图的透明度
|
||||
const currentOpacity = overlayEl.style.opacity || '1';
|
||||
opacitySlider.value = parseFloat(currentOpacity) * 100;
|
||||
opacityValue.textContent = opacitySlider.value + '%';
|
||||
}
|
||||
|
||||
// 计算图片滑动边界
|
||||
|
||||
Reference in New Issue
Block a user