@Override public Object afterDecode(mxCodec dec, Node node, Object obj) { if (obj instanceof mxChildChange) { mxChildChange change = (mxChildChange) obj; // Cells are encoded here after a complete transaction so the previous // parent must be restored on the cell for the case where the cell was // added. This is needed for the local model to identify the cell as a // new cell and register the ID. ((mxICell) change.getChild()).setParent((mxICell) change .getPrevious()); change.setPrevious(change.getParent()); change.setPreviousIndex(change.getIndex()); } return obj; }
@Override public Object afterDecode(mxCodec dec, Node node, Object obj) { if (obj instanceof mxChildChange) { mxChildChange change = (mxChildChange) obj; // Cells are encoded here after a complete transaction so the previous // parent must be restored on the cell for the case where the cell was // added. This is needed for the local model to identify the cell as a // new cell and register the ID. ((mxICell) change.getChild()).setParent((mxICell) change .getPrevious()); change.setPrevious(change.getParent()); change.setPreviousIndex(change.getIndex()); } return obj; }