display space transfer nodes in other colors
This commit is contained in:
parent
2dc26aa1b4
commit
bd1b747a91
3 changed files with 11 additions and 1 deletions
|
@ -175,7 +175,8 @@ class EditorViewSet(ViewSet):
|
||||||
'column': '#888888',
|
'column': '#888888',
|
||||||
'poi': '#4488cc',
|
'poi': '#4488cc',
|
||||||
'shadow': '#000000',
|
'shadow': '#000000',
|
||||||
'graphnode': '#00bb00',
|
'graphnode': '#00BB00',
|
||||||
|
'graphnode__space_transfer': '#008800',
|
||||||
})
|
})
|
||||||
|
|
||||||
@list_route(methods=['get'])
|
@list_route(methods=['get'])
|
||||||
|
|
|
@ -389,6 +389,9 @@ editor = {
|
||||||
_get_geometry_style: function (feature) {
|
_get_geometry_style: function (feature) {
|
||||||
// style callback for GeoJSON loader
|
// style callback for GeoJSON loader
|
||||||
var style = editor._get_mapitem_type_style(feature.properties.type);
|
var style = editor._get_mapitem_type_style(feature.properties.type);
|
||||||
|
if (feature.properties.space_transfer) {
|
||||||
|
style = editor._get_mapitem_type_style('graphnode__space_transfer');
|
||||||
|
}
|
||||||
if (editor._level_control.current_level_id === editor._sublevel_control.current_level_id) {
|
if (editor._level_control.current_level_id === editor._sublevel_control.current_level_id) {
|
||||||
if (editor._sublevel_control.level_ids.indexOf(feature.properties.level) >= 0 && editor._level_control.current_level_id !== feature.properties.level) {
|
if (editor._sublevel_control.level_ids.indexOf(feature.properties.level) >= 0 && editor._level_control.current_level_id !== feature.properties.level) {
|
||||||
style.stroke = true;
|
style.stroke = true;
|
||||||
|
|
|
@ -19,6 +19,12 @@ class GraphNode(SpaceGeometryMixin, models.Model):
|
||||||
verbose_name_plural = _('Graph Nodes')
|
verbose_name_plural = _('Graph Nodes')
|
||||||
default_related_name = 'graphnodes'
|
default_related_name = 'graphnodes'
|
||||||
|
|
||||||
|
def get_geojson_properties(self, *args, **kwargs) -> dict:
|
||||||
|
result = super().get_geojson_properties(*args, **kwargs)
|
||||||
|
if self.space_transfer:
|
||||||
|
result['space_transfer'] = True
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
class WayType(TitledMixin, models.Model):
|
class WayType(TitledMixin, models.Model):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue