Merge branch 'release/9_1_0' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into bugfix/carousel_issues
* 'release/9_1_0' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui: error checks threading fix Revert "Merge branch 'bugfix/carousel_issues' into 'develop'" # Conflicts: # MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift
This commit is contained in:
commit
64e11e8f7a
@ -88,14 +88,18 @@ import UIKit
|
||||
}
|
||||
|
||||
@objc public override func dismissFieldInput(_ sender: Any?) {
|
||||
performDropdownAction()
|
||||
if !textField.isFirstResponder {
|
||||
performDropdownAction()
|
||||
}
|
||||
super.dismissFieldInput(sender)
|
||||
}
|
||||
|
||||
func performDropdownAction() {
|
||||
if let baseDropdownEntryFieldModel = baseDropdownEntryFieldModel, let actionModel = baseDropdownEntryFieldModel.action {
|
||||
let additionalDataWithSource = additionalData.dictionaryAdding(key: KeySourceModel, value: baseDropdownEntryFieldModel)
|
||||
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
||||
}
|
||||
guard let baseDropdownEntryFieldModel = baseDropdownEntryFieldModel,
|
||||
let actionModel = baseDropdownEntryFieldModel.action
|
||||
else { return }
|
||||
|
||||
let additionalDataWithSource = additionalData.dictionaryAdding(key: KeySourceModel, value: baseDropdownEntryFieldModel)
|
||||
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,6 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
super.reset()
|
||||
barReferences.forEach { $0.removeFromSuperview() }
|
||||
barReferences = []
|
||||
currentIndex = 0
|
||||
}
|
||||
|
||||
public override func updateUI(previousIndex: Int, newIndex: Int, totalCount: Int, isAnimated: Bool) {
|
||||
|
||||
@ -248,10 +248,4 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol {
|
||||
bottomConstraint?.constant = constant
|
||||
topConstraint?.constant = constant
|
||||
}
|
||||
|
||||
open override func reset() {
|
||||
super.reset()
|
||||
currentIndex = 0
|
||||
previousIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ open class Carousel: View {
|
||||
open var numberOfPages = 0
|
||||
|
||||
/// The models for the molecules.
|
||||
public var molecules: [MoleculeModelProtocol & CarouselItemModelProtocol & CollectionItemModelProtocol]?
|
||||
public var molecules: [MoleculeModelProtocol & CarouselItemModelProtocol]?
|
||||
|
||||
/// The horizontal alignment of the cell in the collection view. Only noticeable if the itemWidthPercent is less than 100%.
|
||||
public var itemAlignment = UICollectionView.ScrollPosition.left
|
||||
@ -177,7 +177,6 @@ open class Carousel: View {
|
||||
if let selectedIndex = carouselModel.selectedIndex {
|
||||
let adjustedIndex = loop ? selectedIndex + 2 : selectedIndex
|
||||
collectionView.selectItem(at: IndexPath(row: adjustedIndex, section: 0), animated: false, scrollPosition: [])
|
||||
goTo(adjustedIndex, animated: false)
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,7 +212,7 @@ open class Carousel: View {
|
||||
pagingView?.reset()
|
||||
collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
|
||||
}
|
||||
|
||||
|
||||
var pagingMoleculeName: String?
|
||||
|
||||
/// Sets up the paging molecule
|
||||
|
||||
@ -20,7 +20,7 @@ import UIKit
|
||||
}
|
||||
|
||||
public var backgroundColor: Color?
|
||||
public var molecules: [MoleculeModelProtocol & CarouselItemModelProtocol & CollectionItemModelProtocol]
|
||||
public var molecules: [MoleculeModelProtocol & CarouselItemModelProtocol]
|
||||
public var index: Int = 0
|
||||
public var spacing: CGFloat?
|
||||
public var border: Bool?
|
||||
@ -41,7 +41,7 @@ import UIKit
|
||||
public var selectable = false
|
||||
public var selectedIndex: Int?
|
||||
|
||||
public init(molecules: [MoleculeModelProtocol & CarouselItemModelProtocol & CollectionItemModelProtocol]) {
|
||||
public init(molecules: [MoleculeModelProtocol & CarouselItemModelProtocol]) {
|
||||
self.molecules = molecules
|
||||
}
|
||||
|
||||
|
||||
@ -1053,7 +1053,11 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
}
|
||||
|
||||
+ (CGFloat)getApplicationViewWidth {
|
||||
return CGRectGetWidth([self getBounds:[MVMCoreUISession sharedGlobal].splitViewController.view.superview]);
|
||||
__block CGFloat width;
|
||||
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
||||
width = CGRectGetWidth([self getBounds:[MVMCoreUISession sharedGlobal].splitViewController.view.superview]);
|
||||
}];
|
||||
return width;
|
||||
}
|
||||
|
||||
+ (CGFloat)getApplicationViewMaxSize {
|
||||
|
||||
@ -270,7 +270,9 @@ import UIKit
|
||||
bottomBar?.frame = CGRect(x: 0, y: bounds.height - size, width: bounds.width, height: size)
|
||||
|
||||
if updateMoleculeLayout || heightChanged {
|
||||
delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self)
|
||||
DispatchQueue.main.async { [self] in
|
||||
delegateObject?.moleculeDelegate?.moleculeLayoutUpdated(self)
|
||||
}
|
||||
}
|
||||
|
||||
setNeedsDisplay()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user