话术预览修改

This commit is contained in:
shidongli 2024-07-22 14:57:53 +08:00
parent 1ead0a930e
commit 966decb685

View File

@ -417,6 +417,17 @@ export default {
const toolbar = new G6Editor.Toolbar({
container: "toolbar"
});
const container = document.getElementById('page');
// 为 graph 容器添加鼠标滚轮事件监听
container.addEventListener('mousewheel', (e) => {
e.preventDefault();
const ratio = 1.1; // 设置放大缩小的比例
const oldScale = this.editor.getCurrentPage().getZoom(); // 获取当前的缩放比例
// console.log(oldScale, 'oldScale')
const newScale = e.wheelDelta > 0 ? oldScale * ratio : oldScale / ratio; // 根据滚轮方向计算新的缩放比例
// console.log(newScale, 'oldScale')
this.editor.getCurrentPage().zoom(newScale); // 执行缩放操作
})
// 属性栏
// const detailpannel = new G6Editor.Detailpannel({
// container: "detailpannel"