Skip to content

Commit

Permalink
Merge pull request #209 from glyg/master
Browse files Browse the repository at this point in the history
Removes traitlets DeprecationWarning
  • Loading branch information
maartenbreddels committed Nov 29, 2018
2 parents 43ffe53 + 78465c5 commit 6b51240
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions ipyvolume/transferfunction.py
Expand Up @@ -51,9 +51,9 @@ class TransferFunction(widgets.DOMWidget):
class TransferFunctionJsBumps(TransferFunction):
_model_name = Unicode('TransferFunctionJsBumpsModel').tag(sync=True)
_model_module = Unicode('ipyvolume').tag(sync=True)
levels = traitlets.List(traitlets.CFloat, default_value=[0.1, 0.5, 0.8]).tag(sync=True)
opacities = traitlets.List(traitlets.CFloat, default_value=[0.01, 0.05, 0.1]).tag(sync=True)
widths = traitlets.List(traitlets.CFloat, default_value=[0.1, 0.1, 0.1]).tag(sync=True)
levels = traitlets.List(traitlets.CFloat(), default_value=[0.1, 0.5, 0.8]).tag(sync=True)
opacities = traitlets.List(traitlets.CFloat(), default_value=[0.01, 0.05, 0.1]).tag(sync=True)
widths = traitlets.List(traitlets.CFloat(), default_value=[0.1, 0.1, 0.1]).tag(sync=True)


def control(self, max_opacity=0.2):
Expand Down
12 changes: 6 additions & 6 deletions ipyvolume/widgets.py
Expand Up @@ -226,7 +226,7 @@ class Figure(ipywebrtc.MediaStream):

camera_control = traitlets.Unicode(default_value='trackball').tag(sync=True)
camera_fov = traitlets.CFloat(45,min=0.1,max=179.9).tag(sync=True)
camera_center = traitlets.List(traitlets.CFloat, default_value=[0, 0, 0]).tag(sync=True)
camera_center = traitlets.List(traitlets.CFloat(), default_value=[0, 0, 0]).tag(sync=True)
#Tuple(traitlets.CFloat(0), traitlets.CFloat(0), traitlets.CFloat(0)).tag(sync=True)

camera = traitlets.Instance(pythreejs.Camera, allow_none=True, help='A :any:`pythreejs.Camera` instance to control the camera')\
Expand All @@ -253,12 +253,12 @@ def _default_scene(self):

show = traitlets.Unicode("Volume").tag(sync=True) # for debugging

xlim = traitlets.List(traitlets.CFloat, default_value=[0, 1], minlen=2, maxlen=2).tag(sync=True)
ylim = traitlets.List(traitlets.CFloat, default_value=[0, 1], minlen=2, maxlen=2).tag(sync=True)
zlim = traitlets.List(traitlets.CFloat, default_value=[0, 1], minlen=2, maxlen=2).tag(sync=True)
xlim = traitlets.List(traitlets.CFloat(), default_value=[0, 1], minlen=2, maxlen=2).tag(sync=True)
ylim = traitlets.List(traitlets.CFloat(), default_value=[0, 1], minlen=2, maxlen=2).tag(sync=True)
zlim = traitlets.List(traitlets.CFloat(), default_value=[0, 1], minlen=2, maxlen=2).tag(sync=True)

matrix_projection = traitlets.List(traitlets.CFloat, default_value=[0] * 16, allow_none=True, minlen=16, maxlen=16).tag(sync=True)
matrix_world = traitlets.List(traitlets.CFloat, default_value=[0] * 16, allow_none=True, minlen=16, maxlen=16).tag(sync=True)
matrix_projection = traitlets.List(traitlets.CFloat(), default_value=[0] * 16, allow_none=True, minlen=16, maxlen=16).tag(sync=True)
matrix_world = traitlets.List(traitlets.CFloat(), default_value=[0] * 16, allow_none=True, minlen=16, maxlen=16).tag(sync=True)

xlabel = traitlets.Unicode("x").tag(sync=True)
ylabel = traitlets.Unicode("y").tag(sync=True)
Expand Down

0 comments on commit 6b51240

Please sign in to comment.