Fixing menu location, now works also in lexonomy

Esse commit está contido em:
Ozbolt Menegatti 2019-11-13 23:21:02 +01:00
commit 70642e0f1a
2 arquivos alterados com 3 adições e 3 exclusões

Ver arquivo

@ -16,7 +16,7 @@ class GenericShowModal(ClickMessage):
class ShowMenu(ClickMessage): class ShowMenu(ClickMessage):
def __init__(self, event, translation): def __init__(self, event, translation):
super().__init__(event) super().__init__(event)
self.menu_location = (event.pageX, event.pageY) self.menu_location = (event.layerX, event.layerY)
self.translation = translation self.translation = translation
def update_model(self, model): def update_model(self, model):

Ver arquivo

@ -85,8 +85,8 @@ class View:
@staticmethod @staticmethod
def view_menu(location, menu_shown, translation): def view_menu(location, menu_shown, translation):
style = { style = {
"left": str(location[0]), "left": "{}px".format(location[0]),
"top": str(location[1]) "top": "{}px".format(location[1])
} }
if menu_shown: if menu_shown:
style["opacity"] = "1" style["opacity"] = "1"