Update utils.py
Browse files
utils.py
CHANGED
|
@@ -17,9 +17,9 @@ def calculate_reduced_dimensions(width, height, unit, selection, object_item_val
|
|
| 17 |
else:
|
| 18 |
reduction_width = object_item_value[selection][item_type]['width']
|
| 19 |
reduction_height = object_item_value[selection][item_type]['height']
|
| 20 |
-
|
| 21 |
-
divider_h = object_item_value[
|
| 22 |
-
divider_w = object_item_value[
|
| 23 |
|
| 24 |
# Calculate the reduced dimensions based on the width and height
|
| 25 |
reduced_width = (width - reduction_width) / divider_w
|
|
|
|
| 17 |
else:
|
| 18 |
reduction_width = object_item_value[selection][item_type]['width']
|
| 19 |
reduction_height = object_item_value[selection][item_type]['height']
|
| 20 |
+
selection_div = "divider_sh" if selection == 'shutter' else 'divider_gl'
|
| 21 |
+
divider_h = object_item_value[selection_div][item_type]['height']
|
| 22 |
+
divider_w = object_item_value[selection_div][item_type]['width']
|
| 23 |
|
| 24 |
# Calculate the reduced dimensions based on the width and height
|
| 25 |
reduced_width = (width - reduction_width) / divider_w
|