Fixing menu location, now works also in lexonomy

pull/1/head
Ozbolt Menegatti 5 years ago
parent daa56ba7ac
commit 70642e0f1a

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

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

Loading…
Cancel
Save