ure.setGeometry(new ol.geom.LineString(e.coordinates));
      });
      topo.on('removeedge', function(e) {
        removeElementFeature(edges, e);
      });
      topo.on('addface', faceToFeature);
      topo.on('removeface', function(e) {
        removeElementFeature(faces, e);
      });

      function removeElementFeature(source, element) {
        var feature = source.getFeatureById(element.id);
        source.removeFeature(feature);
      }

      function nodeToFeature(node) {
        var feature = n