jjzjj

rotateHandleStartPos

全部标签

javascript - 如何在D3中旋转图形?

任务是用d3旋转图形,类似PowerPoint的方式:得到thisexample,试图实现相同的行为。无法理解,错误在哪里-人物在摇晃,没有按照应有的方式旋转。functiondragPointRotate(rotateHandleStartPos){rotateHandleStartPos.x+=d3.event.dx;rotateHandleStartPos.y+=d3.event.dy;constupdatedRotateCoordinates=r//calculatesthedifferencebetweenthecurrentmousepositionandthecenter