title: Why I can't change style in mxEvent.CHANGE event first time?
body: <p>I just want to change some style when the CHANGE event fired.But when I change the model by insert or move a vertex or edge, the style didn't change. And the changed vertex will change it's style after I change anything again. Is anybody konws why?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>graph.getModel().addListener(mxEvent.CHANGE, function(sender, evt){
          if(graphInited){
              graph.getModel().beginUpdate();
              try {
                    var changes = evt.getProperty('edit').changes;
                    for (var i = 0; i &lt; changes.length; i++) {
                        var change = changes[i];
                        var state = graph.view.getState(change.cell);
                        if(state!=null){//color #1C86EE means new insert
                            if(state.style[mxConstants.STYLE_IMAGE_BACKGROUND]!="#1C86EE" 
                            &amp;&amp; state.style[mxConstants.STYLE_STROKECOLOR]!="#1C86EE" 
                            &amp;&amp; state.style[mxConstants.STYLE_FONTCOLOR]!="#1C86EE"){
                                graph.setCellStyles(mxConstants.STYLE_IMAGE_BACKGROUND, '#68228B', [change.cell]);
                                graph.setCellStyles(mxConstants.STYLE_STROKECOLOR, '#68228B', [change.cell]);
                            }
                        }
                    }
              } finally {
                  graph.getModel().endUpdate();
              }
          }
      });
  </code></pre>