@@ -97,17 +97,13 @@ def _container(box_1=None, box_2=None,
97
97
def _draw_line_through_box (dashboard_html , top_left_x , top_left_y , box_w ,
98
98
box_h , is_horizontal , direction , fill_percent = 50 ):
99
99
if is_horizontal :
100
- print 'draw it hori'
101
- print 'fill_percent: {}' .format (fill_percent )
102
- print (fill_percent / 100. )
103
- new_top_left_x = box_w * (fill_percent / 100. )
104
- print new_top_left_x
100
+ new_top_left_x = top_left_x + box_w * (fill_percent / 100. )
105
101
new_top_left_y = top_left_y
106
102
new_box_w = 1
107
103
new_box_h = box_h
108
104
else :
109
105
new_top_left_x = top_left_x
110
- new_top_left_y = top_left_y + box_h / 2
106
+ new_top_left_y = top_left_y + box_h * ( fill_percent / 100. )
111
107
new_box_w = box_w
112
108
new_box_h = 1
113
109
@@ -364,7 +360,6 @@ def get_preview(self):
364
360
current_box_specs = path_to_box_specs [path ]
365
361
366
362
if self ._path_to_box (path )['type' ] == 'split' :
367
- print path
368
363
fill_percent = self ._path_to_box (path )['size' ]
369
364
direction = self ._path_to_box (path )['direction' ]
370
365
is_horizontal = (direction == 'horizontal' )
@@ -385,7 +380,7 @@ def get_preview(self):
385
380
print 'is horizontal'
386
381
new_top_left_x = top_left_x
387
382
new_top_left_y = top_left_y
388
- new_box_w = box_w * (( fill_percent ) / 100. )
383
+ new_box_w = box_w * (fill_percent / 100. )
389
384
new_box_h = box_h
390
385
391
386
new_top_left_x_2 = top_left_x + new_box_w
@@ -394,15 +389,15 @@ def get_preview(self):
394
389
new_box_h_2 = box_h
395
390
else :
396
391
print 'is vertical'
397
- #new_box_w = box_w
398
- #new_box_h = box_h / 2
399
- #new_top_left_x = top_left_x
400
- #new_top_left_y = top_left_y + box_h / 2
401
-
392
+ new_top_left_x = top_left_x
393
+ new_top_left_y = top_left_y
402
394
new_box_w = box_w
403
395
new_box_h = box_h * (fill_percent / 100. )
404
- new_top_left_x = top_left_x
405
- new_top_left_y = top_left_y + box_h * (fill_percent / 100. )
396
+
397
+ new_top_left_x_2 = top_left_x
398
+ new_top_left_y_2 = top_left_y + box_h * (fill_percent / 100. )
399
+ new_box_w_2 = box_w
400
+ new_box_h_2 = box_h * ((100 - fill_percent ) / 100. )
406
401
407
402
first_box_specs = {
408
403
'top_left_x' : top_left_x ,
0 commit comments