for AJAX based small diagram editor