From bf0aeeaa986835c27bc673979379ab1304ba7b05 Mon Sep 17 00:00:00 2001 From: BruceSherwood Date: Tue, 30 Jul 2019 16:32:02 -0500 Subject: [PATCH] compound origin fix --- vpython/vpython.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpython/vpython.py b/vpython/vpython.py index b2b4945..5bd316f 100644 --- a/vpython/vpython.py +++ b/vpython/vpython.py @@ -3121,7 +3121,6 @@ def handle_event(self, evt): ## events and scene info updates self.mouse.setpick( evt ) self._waitfor = True # what pick is looking for elif ev == '_compound': # compound, text, extrusion - print('compound event return') obj = self._compound p = evt['pos'] if obj._objName == 'text': @@ -3132,6 +3131,7 @@ def handle_event(self, evt): ## events and scene info updates # Set attribute_vector.value, which avoids nullifying the # on_change functions that detect changes in e.g. obj.pos.y obj._pos.value = list_to_vec(p) + obj._origin = obj._pos s = evt['size'] obj._size.value = obj._size0 = list_to_vec(s) obj._axis.value = obj._size._x*norm(obj._axis)