Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/402.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在draw2dTouch中可调整大小但不可拖动_Javascript_Graphiti Js_Draw2d Js - Fatal编程技术网

Javascript 在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

我在draw2dTouch中尝试过这样的事情:

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