Javascript 在draw2dTouch中可调整大小但不可拖动
我在draw2dTouch中尝试过这样的事情:Javascript 在draw2dTouch中可调整大小但不可拖动,javascript,graphiti-js,draw2d-js,Javascript,Graphiti Js,Draw2d Js,我在draw2dTouch中尝试过这样的事情: this.setSelectable(true); this.setDraggable(false); this.setResizeable(true); 但这种行为并不是人们所期望的那样。因此,请检查这是否是由于新版本导致的库错误。因为我认为在以前的版本中不是这样的 提前谢谢。请帮我一下。我被困在里面了。我也有这个问题 这似乎是一只虫子。我在SingleSelectionPolicy.js中添加了这行“this.mousedowneElemen
this.setSelectable(true);
this.setDraggable(false);
this.setResizeable(true);
但这种行为并不是人们所期望的那样。因此,请检查这是否是由于新版本导致的库错误。因为我认为在以前的版本中不是这样的
提前谢谢。请帮我一下。我被困在里面了。我也有这个问题 这似乎是一只虫子。我在SingleSelectionPolicy.js中添加了这行“this.mousedowneElement=figure;”来解决这个问题,如下所示
if (figure !== canvas.getSelection().getPrimary() && figure !== null && figure.isSelectable() === true) {
this.select(canvas,figure);
// its a line
if (figure instanceof draw2d.shape.basic.Line) {
if (!(figure instanceof draw2d.Connection)) {
canvas.draggingLineCommand = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE));
if (canvas.draggingLineCommand !== null) {
canvas.draggingLine = figure;
}
}
//added to fix Draw2D draggable = false bug
this.mouseDownElement = figure;
}
else if (canDragStart === false) {
figure.unselect();
}
}