문제

I'm trying to retrieve rotation value of currently selected cell, during and after rotation with handle.;

the cell "style" seems to hold the rotation value in its string but I did not find the way to retrieve it even with mxUtils.getValue(style, "rotation",0);

var cell = graph.getSelectionCell();
var preview = this.graphHandler;
// during mouse move
if (preview != null && preview.shape != null) {
  var angle = preview.shape.rotation; }
else {
  var angle  = mxUtils.toRadians(mxUtils.getValue(cell.getStyle(),mxConstants.STYLE_ROTATION, 0)); 
// var angle = cell.state.shape.getShapeRotation();  
} 

Any help would be helpful

Philippe

도움이 되었습니까?

해결책

Try mxUtils.getValue(graph.view.getState(cell).style,mxConstants.STYLE_ROTATION,0)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top