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]);
};