ssjtbcf commented on issue #5252:
URL: https://github.com/apache/echarts/issues/5252#issuecomment-1596430838

   > ```js
   > if(typeof target_Obj != 'undefined' && target_Obj != null) { 
//target_Obj选中的目标对象(矩形边框)
   >                            origin++;//旋转度数
   >                            var coord = 
zr.storage._elements[target_Obj.id].transformCoordToLocal(target_Obj.shape.x, 
target_Obj.shape.y);
   >                            
zr.remove(zr.storage._elements[target_Obj.id]);//因为没找到之前modshape()这个函数只能先删掉再重新绘制
   >                            var rect = new Rect({
   >                                                    id : target_Obj.id,
   >                                                    style: {
   >                                                            // 
smoothConstraint: [[-Infinity, -Infinity], [200, Infinity]],
   >                                                            fill: 
'rgba(220, 20, 60, 0)',
   >                                                            stroke: 
"rgba(220, 20, 60, 1)",
   >                                                            lineWidth: 2
   >                                                    },
   >                                                    shape: {
   >                                                            r: 0,
   >                                                            x: coord[0],
   >                                                            y: coord[1],
   >                                                            width: 
target_Obj.shape.width,
   >                                                            height : 
target_Obj.shape.height,
   >                                                    },
   >                                                    draggable : true,
   >                                                    rotation : [origin],
   >                                                    origin: 
[target_Obj.shape.x + target_Obj.shape.width/2, target_Obj.shape.y + 
target_Obj.shape.height/2],
   >                                                    });
   >                                            zr.add(rect);
   >                            }
   > ```
   > 
   > 
---------------------------------------------------以上是代码------------------------
 当新的矩形框绘制出来以后进行拖拽后,该矩形框像是不未在当前画布上,或者是我没有设置更新后的坐标?发生偏移?
   
   绘制新的图形后,更新新的origin坐标了吗


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to