syncing master
This commit is contained in:
@@ -48,14 +48,11 @@ class ProjectPresenter(object):
|
||||
|
||||
# Move coordinates to reflect origin being at top-left
|
||||
# (as per canvas) instead of bottom-left
|
||||
# if max_y is not passed - use the panels instead of buildings
|
||||
if max_y is None:
|
||||
height = max(map(lambda row: row['y'], table_data))
|
||||
else:
|
||||
height = max_y
|
||||
height = max(map(lambda row: row['y'], table_data))
|
||||
first_cell = min(map(lambda row: row['y'], table_data))
|
||||
self.offset = height
|
||||
for panel in table_data:
|
||||
panel['y'] = height - panel['y']
|
||||
panel['y'] = height - panel['y'] + first_cell
|
||||
return table_data
|
||||
|
||||
def get_buildings(self, buildings):
|
||||
@@ -76,10 +73,6 @@ class ProjectPresenter(object):
|
||||
point.y = point.y * spacing_y
|
||||
presentable_building.append(point.__dict__)
|
||||
|
||||
for presentable_building in result:
|
||||
for point in presentable_building:
|
||||
point['y'] = self.offset - point['y']
|
||||
|
||||
return result
|
||||
|
||||
def get_max_y(self,buildings, panels):
|
||||
|
||||
Reference in New Issue
Block a user