Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/479.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 RaphaelJS:使用极限中的FreeTransform移动和缩放对象_Javascript_Raphael_Transform_Collision Detection - Fatal编程技术网

Javascript RaphaelJS:使用极限中的FreeTransform移动和缩放对象

Javascript RaphaelJS:使用极限中的FreeTransform移动和缩放对象,javascript,raphael,transform,collision-detection,Javascript,Raphael,Transform,Collision Detection,我正在使用FreeTransform插件来移动和缩放对象 我想将移动和缩放限制为包含此对象的另一个矩形的大小。我怎样才能做到这一点 我已经提供了一个关于这个问题的例子。(我希望红色矩形留在另一个矩形内。) 谢谢。FreeTransform插件提供了设置边界的选项: boundary: { x: x-pos, y: y-post, width: i, height: i}, 请参阅文档

我正在使用FreeTransform插件来移动和缩放对象

我想将移动和缩放限制为包含此对象的另一个矩形的大小。我怎样才能做到这一点

我已经提供了一个关于这个问题的例子。(我希望红色矩形留在另一个矩形内。)


谢谢。

FreeTransform插件提供了设置边界的选项:

    boundary: { x: x-pos, y: y-post, width: i, height: i},
请参阅文档