// check whether this is a fullText stepif(!from &&!to && state.fullText){this.figure.setValue(state.fullText);
return;
}var fromText=from.shapeText;
var toText=to.shapeText;
if(fromText.length==0&&toText.length==0){// nothing to reapply?return;
}if(fromText.length==0){// We are creating.var o=dojox.xml.DomParser.parse(toText).documentElement;
var a=this.figure._loadAnnotation(o);
if(a)this.figure._add(a);
return;
}if(toText.length==0){// we are deleting.var ann=this.figure.get(from.shapeId);
this.figure._delete([ann],true);
return;
}// we can simply reinit and draw from the shape itself,// regardless of the actual command.var nann=this.figure.get(to.shapeId);
var no=dojox.xml.DomParser.parse(toText).documentElement;
nann.draw(no);
this.figure.select(nann);
return;