Acutually uses Arrow.preserve_tip_size_when_scaling

This commit is contained in:
Grant Sanderson 2020-06-22 15:22:05 -07:00
parent 687d70e9b6
commit 09df42a755

View file

@ -591,18 +591,19 @@ class Arrow(Line):
self.set_stroke_width_from_length() self.set_stroke_width_from_length()
# So horribly confusing, must redo # So horribly confusing, must redo
if has_tip: if self.preserve_tip_size_when_scaling:
self.add_tip() if has_tip:
old_tips[0].points[:, :] = self.tip.points self.add_tip()
self.remove(self.tip) old_tips[0].points[:, :] = self.tip.points
self.tip = old_tips[0] self.remove(self.tip)
self.add(self.tip) self.tip = old_tips[0]
if has_start_tip: self.add(self.tip)
self.add_tip(at_start=True) if has_start_tip:
old_tips[1].points[:, :] = self.start_tip.points self.add_tip(at_start=True)
self.remove(self.start_tip) old_tips[1].points[:, :] = self.start_tip.points
self.start_tip = old_tips[1] self.remove(self.start_tip)
self.add(self.start_tip) self.start_tip = old_tips[1]
self.add(self.start_tip)
return self return self
def get_normal_vector(self): def get_normal_vector(self):