code: function(win, elems) {
  				var mode = svgCanvas.getMode();
  				if (mode === 'select') {
  					setSelectMode();
  				}
  				var is_node = (mode == "pathedit");
  				// if elems[1] is present, then we have more than one element
  				selectedElement = (elems.length === 1 || elems[1] == null ? elems[0] : null);
  				multiselected = (elems.length >= 2 && elems[1] != null);
  				if (selectedElement != null) {
  					// unless we're already in always set the mode of the editor to select because
  					// upon creation of a text element the editor is switched into
  					// select mode and this event fires - we need our UI to be in sync
  
  					if (!is_node) {
  						updateToolbar();
  					}
  				} // if (elem != null)
  
  				// Deal with pathedit mode
  				togglePathEditMode(is_node, elems);
  				updateContextPanel();
  				svgCanvas.runExtensions('selectedChanged', {
  					elems: elems,
  					selectedElement: selectedElement,
  					multiselected: multiselected
  				});
  			}
docs: called when we've selected a different element