Skip to content
Snippets Groups Projects
Commit b5e688b3 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #8 - firefox grid position bug (sort tiles by x,y)

parent 6066cb75
No related branches found
No related tags found
No related merge requests found
...@@ -14,3 +14,6 @@ class TileLayoutSettings: ...@@ -14,3 +14,6 @@ class TileLayoutSettings:
class PageInstance: class PageInstance:
uniqueName: str uniqueName: str
tileLayouts: Dict[str, TileLayoutSettings] tileLayouts: Dict[str, TileLayoutSettings]
def get_tile_layouts_sorted(self):
return {k: v for k, v in sorted(self.tileLayouts.items(), key=lambda item: item)}
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</head> </head>
<body> <body>
<div class="grid-stack"> <div class="grid-stack">
{% for tileName, tileLayoutSettings in page.tileLayouts.items() %} {% for tileName, tileLayoutSettings in page.get_tile_layouts_sorted().items() %}
<div class="grid-stack-item" <div class="grid-stack-item"
id="tile-{{ page.uniqueName | replace(' ', '_') }}_{{ tileName }}" id="tile-{{ page.uniqueName | replace(' ', '_') }}_{{ tileName }}"
data-gs-x="{{ tileLayoutSettings.x }}" data-gs-y="{{ tileLayoutSettings.y }}" data-gs-x="{{ tileLayoutSettings.x }}" data-gs-y="{{ tileLayoutSettings.y }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment