-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
I've recently make the CircleClock hand-like instead of circle like(https://github.com/89ao/.hammerspoon/blob/a388afe9c89667c073319bd3ad1ae35847e88b84/Spoons/CircleClock.spoon/init.lua)

Howerver, when I use percentage number in coordinates key to location the minute hand and hour hand ,It seem to consider the full frame, which makes the minute hand and the hour hand seems to be too long .
obj.canvas[3].endAngle = secangle
local minangle1 = 6 * math.tointeger(os.date("%M")) + 6 / 60 * math.tointeger(os.date("%S"))
local minarc_x = 50 + 50 * math.sin(math.rad(minangle1))
local minarc_y = 50 - 50 * math.cos(math.rad(minangle1))
obj.canvas[7].coordinates = {
{x = "50%", y = "50%"},
{x = tostring(minarc_x) .. "%", y = tostring(minarc_y) .. "%"}
}
So the question is : How can I make it shorter (for example hour hand inside the watch_hourcircle/canvas[4] and minute hand inside the watch_mincircle/canvas[6] )
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels