Skip to content

Commit 687d4e5

Browse files
Merge pull request #122 from vpython/Round_arrows
Round arrows
2 parents 6f33d68 + 24ebde1 commit 687d4e5

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

labextension/vpython/src/glowcommlab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ var attrsb = {'a':'userzoom', 'b':'userspin', 'c':'range', 'd':'autoscale', 'e':
472472
'p':'left', 'q':'right', 'r':'top', 's':'bottom', 't':'_cloneid',
473473
'u':'logx', 'v':'logy', 'w':'dot', 'x':'dot_radius',
474474
'y':'markers', 'z':'legend', 'A':'label','B':'delta', 'C':'marker_color',
475-
'D':'size_units', 'E':'userpan', 'F':'scroll', 'G':'choices', 'H':'depth'}
475+
'D':'size_units', 'E':'userpan', 'F':'scroll', 'G':'choices', 'H':'depth', 'I':'round'}
476476

477477
// methods are X in {'m': '23X....'}
478478
var methods = {'a':'select', 'b':'pos', 'c':'start', 'd':'stop', 'f':'clear', // unused eghijklmnopvxyzCDFAB

vpython/vpython.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
'right':'q', 'top':'r', 'bottom':'s', '_cloneid':'t',
9898
'logx':'u', 'logy':'v', 'dot':'w', 'dot_radius':'x',
9999
'markers':'y', 'legend':'z', 'label':'A', 'delta':'B', 'marker_color':'C',
100-
'size_units':'D', 'userpan':'E', 'scroll':'F'}
100+
'size_units':'D', 'userpan':'E', 'scroll':'F', 'choices':'G', 'depth':'H', 'round':'I'}
101101

102102
# methods are X in {'m': '23X....'}
103103
# pos is normally updated as an attribute, but for interval-based trails, it is updated (multiply) as a method
@@ -488,7 +488,7 @@ class standardAttributes(baseObj):
488488
'shininess', 'emissive', 'texture', 'frame', 'material',
489489
'make_trail', 'trail_type', 'interval',
490490
'retain', 'trail_color', 'trail_radius', 'texture',
491-
'shaftwidth', 'headwidth', 'headlength', 'pickable'],
491+
'round', 'shaftwidth', 'headwidth', 'headlength', 'pickable'],
492492
['red', 'green', 'blue','length', 'width', 'height']],
493493
'ring':[['pos', 'color', 'trail_color', 'size'],
494494
['axis', 'up'],
@@ -1242,12 +1242,20 @@ class arrow(standardAttributes):
12421242
def __init__(self, **args):
12431243
args['_default_size'] = vector(1,0.2,0.2)
12441244
args['_objName'] = "arrow"
1245+
self._round = False
12451246
self._shaftwidth = 0
12461247
self._headwidth = 0
12471248
self._headlength = 0
12481249

12491250
super(arrow, self).setup(args)
12501251

1252+
@property
1253+
def round(self):
1254+
return self._round
1255+
@round.setter
1256+
def round(self,value):
1257+
raise AttributeError('Cannot change the "round" attribute of an arrow.')
1258+
12511259
@property
12521260
def shaftwidth(self):
12531261
return self._shaftwidth

vpython/vpython_libraries/glow.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vpython/vpython_libraries/glowcomm.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
'p':'left', 'q':'right', 'r':'top', 's':'bottom', 't':'_cloneid',
400400
'u':'logx', 'v':'logy', 'w':'dot', 'x':'dot_radius',
401401
'y':'markers', 'z':'legend', 'A':'label','B':'delta', 'C':'marker_color',
402-
'D':'size_units', 'E':'userpan', 'F':'scroll', 'G':'choices', 'H':'depth'}
402+
'D':'size_units', 'E':'userpan', 'F':'scroll', 'G':'choices', 'H':'depth', 'I':'round'}
403403

404404
// methods are X in {'m': '23X....'}
405405
var methods = {'a':'select', 'b':'pos', 'c':'start', 'd':'stop', 'f':'clear', // unused eghijklmnopvxyzCDFAB

vpython/vpython_libraries/glowcomm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ var attrsb = {'a':'userzoom', 'b':'userspin', 'c':'range', 'd':'autoscale', 'e':
444444
'p':'left', 'q':'right', 'r':'top', 's':'bottom', 't':'_cloneid',
445445
'u':'logx', 'v':'logy', 'w':'dot', 'x':'dot_radius',
446446
'y':'markers', 'z':'legend', 'A':'label','B':'delta', 'C':'marker_color',
447-
'D':'size_units', 'E':'userpan', 'F':'scroll', 'G':'choices', 'H':'depth'}
447+
'D':'size_units', 'E':'userpan', 'F':'scroll', 'G':'choices', 'H':'depth', 'I':'round'}
448448

449449
// methods are X in {'m': '23X....'}
450450
var methods = {'a':'select', 'b':'pos', 'c':'start', 'd':'stop', 'f':'clear', // unused eghijklmnopvxyzCDFAB

0 commit comments

Comments
 (0)