don770omr commited on
Commit
5fbaf75
·
verified ·
1 Parent(s): 9c33457

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -3
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['divider'][item_type]['height']
22
- divider_w = object_item_value['divider'][item_type]['width']
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