mirror of
https://github.com/kepler155c/opus
synced 2025-01-03 20:30:28 +00:00
mark with drag fix
This commit is contained in:
parent
c44dc765da
commit
bf870479c4
@ -114,7 +114,6 @@ function Manager:init()
|
|||||||
|
|
||||||
mouse_up = function(_, button, x, y)
|
mouse_up = function(_, button, x, y)
|
||||||
local ie = Input:translate('mouse_up', button, x, y)
|
local ie = Input:translate('mouse_up', button, x, y)
|
||||||
|
|
||||||
local currentPage = self:getActivePage()
|
local currentPage = self:getActivePage()
|
||||||
|
|
||||||
if ie.code == 'control-shift-mouse_click' then -- hack
|
if ie.code == 'control-shift-mouse_click' then -- hack
|
||||||
@ -134,12 +133,9 @@ function Manager:init()
|
|||||||
mouse_drag = function(_, button, x, y)
|
mouse_drag = function(_, button, x, y)
|
||||||
local ie = Input:translate('mouse_drag', button, x, y)
|
local ie = Input:translate('mouse_drag', button, x, y)
|
||||||
local currentPage = self:getActivePage()
|
local currentPage = self:getActivePage()
|
||||||
|
|
||||||
if ie and currentPage then
|
if ie and currentPage then
|
||||||
local event = currentPage:pointToChild(x, y)
|
self:click(currentPage, ie.code, button, x, y)
|
||||||
event.type = ie.code
|
|
||||||
event.ie = ie
|
|
||||||
self:inputEvent(event.element, event)
|
|
||||||
currentPage:sync()
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user