mxGraph:移动边缘的句柄点时会触发哪个事件? [英] mxGraph: Which event is fired when I move a handle point of an edge?

查看:51
本文介绍了mxGraph:移动边缘的句柄点时会触发哪个事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我移动了点,并且希望在移动后保存位置.我怎样才能赶上这个活动?我知道,边缘在移动后会得到点,我可以在几何图形中找到控制点.但是我需要运动结束的那一刻.

I move the point and I want to save the position after the movement. How can I catch this event? I know, the edge gets the points after moving, I can find control points in the geometry. But I need the moment of the end of movement.

推荐答案

我不确定是否有帮助,但是我通常有一个mxEvent.CHANGE侦听器,并处理每个更改...

I'm not sure if it helps, but I usually have a listener to mxEvent.CHANGE, and process each change...

类似这样的东西:

model.addListener(mxEvent.CHANGE, function(sender, evt)
{
   var changes = evt.getProperty('edit').changes;
   for (var i = 0; i < changes.length; i++) {   
     if (changes[i].constructor.name ==  "mxTerminalChange") {
       // DO SOMETHING
     }
   }
}

这篇关于mxGraph:移动边缘的句柄点时会触发哪个事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆