Skip to content

Commit

Permalink
fixes options for Graphics3D builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
poke1024 committed Aug 23, 2016
1 parent 72030fd commit 260f10c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mathics/builtin/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,13 @@ def __init__(self, content, evaluation):
self.evaluation = evaluation
self.elements = []

builtins = evaluation.definitions.builtin
def get_options(name):
builtin = builtins.get(name)
if builtin is None:
return None
return builtin.options

def convert(content, style):
if content.has_form('List', None):
items = content.leaves
Expand All @@ -1463,7 +1470,7 @@ def convert(content, style):
elif head[-3:] == 'Box': # and head[:-3] in element_heads:
element_class = get_class(head)
if element_class is not None:
options = evaluation.definitions.builtin[head[:-3]].options
options = get_options(head[:-3])
if options:
data, options = _data_and_options(item.leaves, options)
new_item = Expression(head, *data)
Expand Down

0 comments on commit 260f10c

Please sign in to comment.