Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/430.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_Kineticjs_Right Click - Fatal编程技术网

Javascript 单击运动矩形上的关联菜单

Javascript 单击运动矩形上的关联菜单,javascript,kineticjs,right-click,Javascript,Kineticjs,Right Click,我想有一个菜单右键点击一个矩形。 您可以将此示例用于矩形 @马克:你能帮我一下吗?请看下面的链接,我已经做了75%。此外,我想有权访问每个矩形分别。 var rect = new Kinetic.Rect({ x: 239, y: 75, width: 100, height: 50, fill: 'green', stroke: 'black', strokeWidth: 4

我想有一个菜单右键点击一个矩形。 您可以将此示例用于矩形


@马克:你能帮我一下吗?请看下面的链接,我已经做了75%。此外,我想有权访问每个矩形分别。
 var rect = new Kinetic.Rect({
        x: 239,
        y: 75,
        width: 100,
        height: 50,
        fill: 'green',
        stroke: 'black',
        strokeWidth: 4
      });

      // add the shape to the layer
      layer.add(rect);

      // add the layer to the stage
      stage.add(layer);

      rect.on('click',stgClicked);