Skip to content

Commit 92db49f

Browse files
Merge pull request #247 from vpython/glow_update
fixed gdots color bug
2 parents 4d2a194 + 2241054 commit 92db49f

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

vpython/vpython.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def Exit():
7777
# attrs are X in {'a': '23X....'}
7878
__attrs = {'pos':'a', 'up':'b', 'color':'c', 'trail_color':'d', # don't use single and double quotes; available: comma, but maybe that would cause trouble
7979
'ambient':'e', 'axis':'f', 'size':'g', 'origin':'h',
80-
'direction':'j', 'linecolor':'k', 'bumpaxis':'l', 'dot_color':'m',
80+
'direction':'j', 'linecolor':'k', 'bumpaxis':'l',
8181
'foreground':'n', 'background':'o', 'ray':'p', 'center':'E', 'forward':'#', 'resizable':'+',
8282

8383
# scalar attributes
@@ -120,7 +120,7 @@ def Exit():
120120
'delete':'M', 'capture':'N'}
121121

122122
__vecattrs = ['pos', 'up', 'color', 'trail_color', 'axis', 'size', 'origin',
123-
'direction', 'linecolor', 'bumpaxis', 'dot_color', 'ambient', 'add_to_trail',
123+
'direction', 'linecolor', 'bumpaxis', 'ambient', 'add_to_trail',
124124
'foreground', 'background', 'ray', 'ambient', 'center', 'forward', 'normal',
125125
'marker_color', 'offset']
126126

@@ -2101,7 +2101,6 @@ def setup(self, args):
21012101
super(gobj, self).__init__()
21022102
## default values of shared attributes
21032103
self._color = vector(0,0,0)
2104-
self._dot_color = vector(0,0,0)
21052104
self._marker_color = vector(0,0,0)
21062105
self._dot = False
21072106
self._delta = 1
@@ -2133,7 +2132,7 @@ def setup(self, args):
21332132
del args['pos']
21342133

21352134
## override default vector attributes
2136-
vectorAttributes = ['color', 'dot_color', 'marker_color']
2135+
vectorAttributes = ['color', 'marker_color']
21372136
for a in vectorAttributes:
21382137
if a in args:
21392138
argsToSend.append(a)
@@ -2341,14 +2340,6 @@ def dot(self,val):
23412340
self._dot = val
23422341
self.addattr('dot')
23432342

2344-
@property
2345-
def dot_color(self): return self._dot_color
2346-
@dot_color.setter
2347-
def dot_color(self,val):
2348-
if not isinstance(val, vector): raise TypeError('dot_color must be a vector')
2349-
self._dot_color = vector(val)
2350-
self.addattr('dot_color')
2351-
23522343
@property
23532344
def dot_radius(self): return self._dot_radius
23542345
@dot_radius.setter

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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
window.close();
2222
}
2323

24-
console.log('START OF GLOWCOMM')
24+
25+
26+
27+
console.log('START OF GLOWCOMM HTML')
2528

2629
function fontloading() {
2730
"use strict";

vpython/vpython_libraries/glowcomm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var isopen = false
99

1010
window.Plotly = Plotly
1111

12-
console.log('START OF GLOWCOMM')
12+
console.log('START OF GLOWCOMM JS')
1313

1414
IPython.notebook.kernel.comm_manager.register_target('glow',
1515
function(commChannel, msg) {

0 commit comments

Comments
 (0)