跳到主要内容

zoomIn

描述

在点击“放大”按钮或调用 zoomIn() 方法后触发

用法

"zoomIn": (step: number) => void;

参数

zoomIn 事件的回调函数会使用以下参数进行调用:

  • step - (必需)显示 scale 属性步长的值。
信息

要处理 Diagram Editor 的内部事件,您可以使用 on() 方法。

示例

// 初始化 Diagram Editor
const editor = new dhx.DiagramEditor("editor_container");
// 加载数据
editor.parse(data);

// 为事件绑定处理程序
editor.events.on("zoomIn", (step) => {
console.log("The diagram in the editor is zoomed in. The step is" + step);
});

更新日志: step 参数在 v6.0 中新增