fix graph editing with changeset
This commit is contained in:
parent
a554a0ceae
commit
dabc18b3cb
2 changed files with 3 additions and 2 deletions
|
@ -250,7 +250,7 @@ editor = {
|
|||
editor._active_graph_node_html = null;
|
||||
active_graph_node.remove();
|
||||
} else {
|
||||
editor._active_graph_node = parseInt(active_graph_node_id);
|
||||
editor._active_graph_node = parseInt(active_graph_node_id) || active_graph_node_id;
|
||||
editor._active_graph_node_html = active_graph_node.html();
|
||||
}
|
||||
} else if (editor._active_graph_node_html !== null) {
|
||||
|
|
|
@ -8,6 +8,7 @@ from c3nav.mapdata.fields import GeometryField, I18nField
|
|||
from c3nav.mapdata.models.access import AccessRestrictionMixin
|
||||
from c3nav.mapdata.models.base import SerializableMixin
|
||||
from c3nav.mapdata.models.geometry.space import SpaceGeometryMixin
|
||||
from c3nav.mapdata.utils.geometry import smart_mapping
|
||||
|
||||
|
||||
class GraphNode(SpaceGeometryMixin, models.Model):
|
||||
|
@ -27,7 +28,7 @@ class GraphNode(SpaceGeometryMixin, models.Model):
|
|||
|
||||
@property
|
||||
def coords(self):
|
||||
return self.geometry.wrapped_geojson['coordinates']
|
||||
return smart_mapping(self.geometry)['coordinates']
|
||||
|
||||
|
||||
class WayType(SerializableMixin, models.Model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue