Browse Source

Fix weight setting on points.

pull/1/head
Taylor Bockman 5 years ago
parent
commit
d871566e92
  1. 2
      clusterview2/point_manager.py
  2. 3
      clusterview2/points.py

2
clusterview2/point_manager.py

@ -32,7 +32,7 @@ class PointManager():
# We will need to cast the string representation of color
# back into a Color enum.
PointManager.point_set.add_point(point['x'], point['y'],
Color(point['color'], point['weight']))
Color(point['color']), point['weight'])
@staticmethod
def save(location):

3
clusterview2/points.py

@ -71,7 +71,7 @@ class Point(BasePoint):
@weight.setter
def weight(self, weight):
return self._weight
self._weight = weight
@property
def cluster(self):
@ -179,6 +179,7 @@ class Point(BasePoint):
s += f"X: {self._x} | Y: {self._y} | "
s += f"SIZE: {self._point_size} | "
s += f"COLOR: {self._color} | "
s += f"WEIGHT: {self._weight} | "
s += f"VIEWPORT_WIDTH: {self._viewport_width} | "
s += f"VIEWPORT_HEIGHT: {self._viewport_height}"
s += ">"

Loading…
Cancel
Save