Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/465.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 如何使矩形的特定边可以调整大小?_Javascript_Raphael_Graphiti Js - Fatal编程技术网

Javascript 如何使矩形的特定边可以调整大小?

Javascript 如何使矩形的特定边可以调整大小?,javascript,raphael,graphiti-js,Javascript,Raphael,Graphiti Js,我想使矩形的几面或单面可以用石墨调整大小。 如果有人有任何想法,请帮助我 提前感谢。在1.0.0版中,您可以覆盖Figure.showResizeHandles方法。有关示例,请参见HorizontalBus图 /** * @method * Callback to update the visibility of the resize handles * * @param {graphiti.Canvas} canvas * @param {graphiti.ResizeHandl

我想使矩形的几面或单面可以用石墨调整大小。 如果有人有任何想法,请帮助我


提前感谢。

在1.0.0版中,您可以覆盖Figure.showResizeHandles方法。有关示例,请参见HorizontalBus图

/**
 * @method
 * Callback to update the visibility of the resize handles
 * 
 * @param {graphiti.Canvas} canvas
 * @param {graphiti.ResizeHandle} resizeHandle1 topLeft resize handle
 * @param {graphiti.ResizeHandle} resizeHandle2 topCenter resize handle
 * @param {graphiti.ResizeHandle} resizeHandle3 topRight resize handle
 * @param {graphiti.ResizeHandle} resizeHandle4 rightMiddle resize handle
 * @param {graphiti.ResizeHandle} resizeHandle5 bottomRight resize handle
 * @param {graphiti.ResizeHandle} resizeHandle6 bottomCenter resize handle
 * @param {graphiti.ResizeHandle} resizeHandle7 bottomLeft resize handle
 * @param {graphiti.ResizeHandle} resizeHandle8 leftMiddle resize handle
 * @template
 */
 showResizeHandles: function(canvas, resizeHandle1, resizeHandle2, resizeHandle3, resizeHandle4, resizeHandle5, resizeHandle6, resizeHandle7, resizeHandle8)
 {
    resizeHandle4.setDimension(resizeHandle4.getWidth(), this.getHeight());
    resizeHandle8.setDimension(resizeHandle4.getWidth(), this.getHeight());

    this._super(canvas, resizeHandle1, resizeHandle2, resizeHandle3, resizeHandle4, resizeHandle5, resizeHandle6, resizeHandle7, resizeHandle8);

    resizeHandle1.hide();
    resizeHandle2.hide();
    resizeHandle3.hide();
    resizeHandle5.hide();
    resizeHandle6.hide();
    resizeHandle7.hide();
 },
这将在右侧和左侧创建两个具有父对象全高的调整大小控制柄 数字


版本1.0.0将于9月17日发布

非常感谢。我将期待下一个版本的发布。这将非常有用:)嗨,安德烈亚斯,在上面的场景中,调整大小手柄销将从画布上消失。是否可以显示调整大小手柄,但不允许它们调整图形大小?谢谢