Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top