mirror of
https://github.com/kepler155c/opus
synced 2025-01-30 17:14:46 +00:00
revert multiple sub-canvas mouse click
This commit is contained in:
parent
ffa412c59d
commit
1e675a2e35
@ -73,12 +73,17 @@ function UI.Page:pointToChild(x, y)
|
||||
if self.__target == self then
|
||||
return UI.Window.pointToChild(self, x, y)
|
||||
end
|
||||
x = x + self.offx - self.x + 1
|
||||
y = y + self.offy - self.y + 1
|
||||
--[[
|
||||
-- this is supposed to fix when there are multiple sub canvases
|
||||
local absX, absY = getPosition(self.__target)
|
||||
|
||||
-- this is sketchy
|
||||
x = x + self.offx - self.x - (absX - self.__target.x) + 1
|
||||
y = y + self.offy - self.y - (absY - self.__target.y) + 1
|
||||
|
||||
if self.__target.canvas then
|
||||
x = x - (self.__target.canvas.x - self.__target.x)
|
||||
y = y - (self.__target.canvas.y - self.__target.y)
|
||||
_syslog({'raw', self.__target.canvas.y, self.__target.y})
|
||||
end
|
||||
]]
|
||||
return self.__target:pointToChild(x, y)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user