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
|
if self.__target == self then
|
||||||
return UI.Window.pointToChild(self, x, y)
|
return UI.Window.pointToChild(self, x, y)
|
||||||
end
|
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)
|
local absX, absY = getPosition(self.__target)
|
||||||
|
if self.__target.canvas then
|
||||||
-- this is sketchy
|
x = x - (self.__target.canvas.x - self.__target.x)
|
||||||
x = x + self.offx - self.x - (absX - self.__target.x) + 1
|
y = y - (self.__target.canvas.y - self.__target.y)
|
||||||
y = y + self.offy - self.y - (absY - self.__target.y) + 1
|
_syslog({'raw', self.__target.canvas.y, self.__target.y})
|
||||||
|
end
|
||||||
|
]]
|
||||||
return self.__target:pointToChild(x, y)
|
return self.__target:pointToChild(x, y)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user