0
我正在使用JS mxGraph,并且想要在拖动顶点时禁用自动选择。只有在用户点击它的情况下才能选择顶点,而不移动顶点。 感谢mxGraph - 拖动时禁用顶点选择
我正在使用JS mxGraph,并且想要在拖动顶点时禁用自动选择。只有在用户点击它的情况下才能选择顶点,而不移动顶点。 感谢mxGraph - 拖动时禁用顶点选择
貌似以下工作
mxGraphHandler.prototype.isDelayedSelection = function(cell, me) {
return true;
};
mxGraphHandler.prototype.getCells = function(initialCell) {
if (this.graph.getSelectionCells().includes(initialCell)) {
return this.graph.getMovableCells(this.graph.getSelectionCells());
}
return this.graph.getMovableCells([initialCell]);
};