Skip to content

Commit 52117e5

Browse files
committed
more commenting out
1 parent 1a72c5a commit 52117e5

File tree

1 file changed

+43
-45
lines changed

1 file changed

+43
-45
lines changed

plotly/presentation_objs/presentation_objs.py

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,40 @@ def _box(boxtype, text_or_url, left, top, height, width, id, props_attr,
176176
if boxtype == 'Text':
177177
children_list = text_or_url.split('\n')
178178

179-
props = {
180-
'isQuote': False,
181-
'listType': None,
182-
'paragraphStyle': paragraphStyle,
183-
'size': 4,
184-
#'style': copy.deepcopy(paragraph_styles[paragraphStyle])
185-
'style': paragraph_styles[paragraphStyle]
186-
}
187-
188-
props['style'].update(
189-
{'height': height,
190-
'left': left,
191-
'top': top,
192-
'width': width}
193-
)
179+
#props = {
180+
# 'isQuote': False,
181+
# 'listType': None,
182+
# 'paragraphStyle': paragraphStyle,
183+
# 'size': 4,
184+
# 'style': copy.deepcopy(paragraph_styles[paragraphStyle])
185+
# #'style': paragraph_styles[paragraphStyle]
186+
#}
187+
188+
#props['style'].update(
189+
# {'height': height,
190+
# 'left': left,
191+
# 'top': top,
192+
# 'width': width}
193+
#)
194+
195+
props = {'isQuote': False,
196+
'listType': None,
197+
'paragraphStyle': 'Heading 1',
198+
'size': 4,
199+
'style': {'color': '#3d3d3d',
200+
'fontFamily': 'Open Sans',
201+
'fontSize': 26,
202+
'fontStyle': 'normal',
203+
'fontWeight': 400,
204+
'height': height,
205+
'left': 0.0,
206+
'lineHeight': 'normal',
207+
'minWidth': 20,
208+
'opacity': 1,
209+
'textAlign': 'center',
210+
'textDecoration': 'none',
211+
'top': 350.0,
212+
'width': 1000.0}}
194213

195214
elif boxtype == 'Image':
196215
props = {
@@ -249,10 +268,10 @@ def _box(boxtype, text_or_url, left, top, height, width, id, props_attr,
249268
'type': boxtype
250269
}
251270

252-
if boxtype == 'Text':
253-
child['defaultHeight'] = 36
254-
child['defaultWidth'] = 52
255-
child['resizeVertical'] = False
271+
#if boxtype == 'Text':
272+
# child['defaultHeight'] = 36
273+
# child['defaultWidth'] = 52
274+
# child['resizeVertical'] = False
256275
if boxtype == 'CodePane':
257276
child['defaultText'] = 'Code'
258277

@@ -636,30 +655,7 @@ def _return_layout_specs(num_of_boxes, url_lines, title_lines, text_block,
636655
margin = 18
637656
code_theme = 'tomorrowNight'
638657

639-
# set Headings styles
640-
paragraph_styles['Heading 1'].update(
641-
{'color': '#000016',
642-
'fontFamily': 'Roboto',
643-
'fontSize': 55,
644-
'fontWeight': fontWeight_dict['Black']['fontWeight']}
645-
)
646-
647-
paragraph_styles['Heading 2'] = copy.deepcopy(
648-
paragraph_styles['Heading 1']
649-
)
650-
paragraph_styles['Heading 2'].update({'fontSize': 36})
651-
paragraph_styles['Heading 3'] = copy.deepcopy(
652-
paragraph_styles['Heading 1']
653-
)
654-
paragraph_styles['Heading 3'].update({'fontSize': 30})
655-
656-
# set Body style
657-
paragraph_styles['Body'].update(
658-
{'color': '#000016',
659-
'fontFamily': 'Roboto',
660-
'fontSize': 16,
661-
'fontWeight': fontWeight_dict['Thin']['fontWeight']}
662-
)
658+
# fill back
663659

664660
bkgd_color = '#FFFFFF'
665661
title_font_color = None
@@ -1042,12 +1038,13 @@ def _markdown_to_presentation(self, markdown_string, style, imgStretch):
10421038
code_theme) = _return_layout_specs(num_of_boxes, url_lines,
10431039
title_lines, text_block, code_blocks, slide_num, style)
10441040

1041+
print specs_for_title
1042+
10451043
# background color
10461044
self._color_background(bkgd_color, slide_num)
10471045

10481046
# insert title, text, code, and images
10491047
if len(title_lines) > 0:
1050-
10511048
# clean titles
10521049
title = title_lines[0]
10531050
num_hashes = 0
@@ -1056,6 +1053,7 @@ def _markdown_to_presentation(self, markdown_string, style, imgStretch):
10561053
num_hashes += 1
10571054
title = _remove_extra_whitespace_from_line(title)
10581055

1056+
print specs_for_title
10591057
self._insert(
10601058
box='Text', text_or_url=title,
10611059
left=specs_for_title[0], top=specs_for_title[1],
@@ -1135,7 +1133,7 @@ def _add_missing_slides(self, slide):
11351133
self._add_empty_slide()
11361134

11371135
def _insert(self, box, text_or_url, left, top, height, width, slide=0,
1138-
props_attr={}, style_attr={}, paragraphStyle='Body'):
1136+
props_attr={}, style_attr={}, paragraphStyle=None):
11391137
self._add_missing_slides(slide)
11401138

11411139
left, top, height, width = _return_box_position(left, top, height,

0 commit comments

Comments
 (0)