@@ -12,7 +12,7 @@ def __init__(self, source, target, weight="", directed=False):
12
12
13
13
self ._weight = weight
14
14
15
- self ._thickness = 2
15
+ self ._width = 2
16
16
self ._priority = 0
17
17
self ._color = Color .LIGHT_GREY
18
18
@@ -111,15 +111,15 @@ def directed(self):
111
111
"""Returns whether or not the edge is directed"""
112
112
return self ._directed
113
113
114
- def set_width (self , weight = 2 ):
114
+ def set_width (self , width = 2 ):
115
115
"""Sets the thickness of the edge."""
116
- self ._thickness = weight
117
- self .__ax (lambda x : self ._dispatch_wrapper (x , {"thickness" : weight }))
116
+ self ._width = width
117
+ self .__ax (lambda x : self ._dispatch_wrapper (x , {"thickness" : width }))
118
118
return self
119
119
120
120
def width (self ):
121
121
"""Returns the thickness of the edge."""
122
- return self ._weight
122
+ return self ._width
123
123
124
124
def set_priority (self , value ):
125
125
"""Sets the edge's priority value."""
@@ -134,7 +134,7 @@ def highlight(self, color=None, width=None):
134
134
if color is None :
135
135
color = self ._color
136
136
if width is None :
137
- width = self ._thickness * 2
137
+ width = self ._width * 2
138
138
139
139
self .__ax (
140
140
lambda x : self ._dispatch_wrapper (
@@ -145,7 +145,7 @@ def highlight(self, color=None, width=None):
145
145
pause (500 )
146
146
self .__ax (
147
147
lambda x : self ._dispatch_wrapper (
148
- x , {"color" : str (self ._color ), "thickness" : self ._thickness }
148
+ x , {"color" : str (self ._color ), "thickness" : self ._width }
149
149
)
150
150
)
151
151
return self
@@ -196,7 +196,7 @@ def _data(self):
196
196
"target" : str (self ._target ),
197
197
"directed" : self ._directed ,
198
198
"labels" : {1 : {"text" : str (self ._weight )}},
199
- "thickness" : self ._thickness ,
199
+ "thickness" : self ._width ,
200
200
}
201
201
}
202
202
}
0 commit comments