Colors wip

This commit is contained in:
barsdeveloper
2022-11-03 21:56:38 +01:00
parent 37e2e8acf8
commit 5183aae21b
17 changed files with 771 additions and 158 deletions

View File

@@ -13,7 +13,7 @@ export default class ColorHandlerTemplate extends IDraggableControlTemplate {
y = -(y - radius)
let [r, theta] = Utility.getPolarCoordinates([x, y])
r = Math.min(r, radius), [x, y] = Utility.getCartesianCoordinates([r, theta])
this.locationChangeCallback?.([x / radius, y / radius])
this.locationChangeCallback?.(x / radius, y / radius)
x = Math.round(x + radius)
y = Math.round(-y + radius)
return [x, y]