mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-21 13:47:37 +08:00
Various color picker improvements
This commit is contained in:
@@ -10,12 +10,7 @@ export default class ColorSliderTemplate extends IDraggableControlTemplate {
|
||||
adjustLocation([x, y]) {
|
||||
x = 0
|
||||
y = Utility.clamp(y, 0, this.movementSpaceSize[1])
|
||||
const hsva = this.getColor().toHSVA()
|
||||
this.locationChangeCallback?.([x, y])
|
||||
this.locationChangeCallback?.([x / this.movementSpaceSize[0], 1 - y / this.movementSpaceSize[1]])
|
||||
return [x, y]
|
||||
}
|
||||
|
||||
getColor() {
|
||||
return this.element.windowElement.template.color
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user