Digital ACT-191 ONEAPP-6830 story: removed unused code
This commit is contained in:
parent
7fa81a7794
commit
d1da77f2e5
@ -20,10 +20,8 @@ class CarouselScrollbarViewConttroller: BaseViewController<CarouselScrollbar> {
|
||||
}()
|
||||
|
||||
var slidesTextField = NumericField()
|
||||
var disabledSwitch = Toggle()
|
||||
var positionTextField = NumericField()
|
||||
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
addContentTopView(view: component)
|
||||
@ -33,16 +31,11 @@ class CarouselScrollbarViewConttroller: BaseViewController<CarouselScrollbar> {
|
||||
|
||||
override func setupForm(){
|
||||
super.setupForm()
|
||||
addFormRow(label: "Disabled", view: disabledSwitch)
|
||||
addFormRow(label: "Surface", view: surfacePickerSelectorView)
|
||||
addFormRow(label: "Layout", view: layoutPickerSelectorView)
|
||||
addFormRow(label: "Number Of Slides", view: slidesTextField)
|
||||
addFormRow(label: "Position", view: positionTextField)
|
||||
|
||||
disabledSwitch.onChange = { [weak self] sender in
|
||||
self?.component.isEnabled = !sender.isOn
|
||||
}
|
||||
|
||||
slidesTextField
|
||||
.numberPublisher
|
||||
.sink { [weak self] number in
|
||||
@ -63,25 +56,23 @@ class CarouselScrollbarViewConttroller: BaseViewController<CarouselScrollbar> {
|
||||
}
|
||||
self?.component.position = number.intValue
|
||||
}.store(in: &subscribers)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func setupModel() {
|
||||
//setup UI
|
||||
component.numberOfSlides = 8
|
||||
surfacePickerSelectorView.text = component.surface.rawValue
|
||||
disabledSwitch.isOn = !component.isEnabled
|
||||
slidesTextField.text = String(component.numberOfSlides ?? 1)
|
||||
|
||||
|
||||
//setup test page to show scrubber id was changed
|
||||
component.onScrubberDidChange = { [weak self] scrubberId in
|
||||
guard let self else { return }
|
||||
positionTextField.text = String(scrubberId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func setupPicker(){
|
||||
|
||||
surfacePickerSelectorView.onPickerDidSelect = { [weak self] item in
|
||||
self?.component.surface = item
|
||||
self?.contentTopView.backgroundColor = item.color
|
||||
|
||||
Loading…
Reference in New Issue
Block a user