Fixing menu location, now works also in lexonomy
This commit is contained in:
parent
daa56ba7ac
commit
70642e0f1a
|
@ -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):
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user