fix map images in route

This commit is contained in:
Laura Klünder 2016-12-23 17:17:26 +01:00
parent d76616ca20
commit 283a51f9c3
2 changed files with 7 additions and 3 deletions

View file

@ -339,6 +339,7 @@ class Graph:
# add distances to room routers # add distances to room routers
if orig_distances is not None: if orig_distances is not None:
for room in orig_rooms: for room in orig_rooms:
print(orig_distances[:, None].shape)
routers[room].shortest_paths[orig_room_points[room], :] += orig_distances[:, None] routers[room].shortest_paths[orig_room_points[room], :] += orig_distances[:, None]
if dest_distances is not None: if dest_distances is not None:

View file

@ -21,9 +21,12 @@
</marker> </marker>
</defs> </defs>
<image width="{{ svg_width | stringformat:"f" }}" height="{{ svg_height | stringformat:"f" }}" {% for area in visible_areas %}
x="{{ routepart.svg_min_x | negate | stringformat:"f" }}" y="{{ routepart.svg_min_y | negate | stringformat:"f" }}" <image width="{{ svg_width | stringformat:"f" }}" height="{{ svg_height | stringformat:"f" }}"
xlink:href="/map/{{ routepart.level.name }}.png"></image> x="{{ routepart.svg_min_x | negate | stringformat:"f" }}" y="{{ routepart.svg_min_y | negate | stringformat:"f" }}"
xlink:href="{% url 'site.level_image' level=routepart.level.name area=area %}"></image>
{% endfor %}
<g class="connections"> <g class="connections">
{% for line in routepart.lines %} {% for line in routepart.lines %}