|
@@ -276,8 +276,14 @@ fileprivate extension ColorSlider {
|
|
/// - parameter touch: The touch that triggered the update.
|
|
/// - parameter touch: The touch that triggered the update.
|
|
/// - parameter touchInside: Whether the touch that triggered the update was inside the control when the event occurred.
|
|
/// - parameter touchInside: Whether the touch that triggered the update was inside the control when the event occurred.
|
|
func update(touch: UITouch, touchInside: Bool) {
|
|
func update(touch: UITouch, touchInside: Bool) {
|
|
- internalColor = gradientView.color(from: internalColor, after: touch, insideSlider: touchInside)
|
|
|
|
- previewView?.colorChanged(to: color)
|
|
|
|
|
|
+ //这里会根据触摸在滑块外,决定颜色的饱和度和亮度
|
|
|
|
+ if touchInside == true {
|
|
|
|
+ internalColor = gradientView.color(from: internalColor, after: touch, insideSlider: true)
|
|
|
|
+ previewView?.colorChanged(to: color)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+// internalColor = gradientView.color(from: internalColor, after: touch, insideSlider: touchInside)
|
|
|
|
+// previewView?.colorChanged(to: color)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|