Merge branch 'feature/atomic_vds_line' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into feature/vds_batch_one
This commit is contained in:
commit
12c265bd01
@ -17,6 +17,22 @@ import VDS
|
||||
open var viewModel: LineModel!
|
||||
open var delegateObject: MVMCoreUIDelegateObject?
|
||||
open var additionalData: [AnyHashable : Any]?
|
||||
|
||||
open override var orientation: Line.Orientation {
|
||||
didSet {
|
||||
if orientation == .horizontal {
|
||||
setContentHuggingPriority(.defaultLow, for: .horizontal)
|
||||
setContentHuggingPriority(.required, for: .vertical)
|
||||
setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||
setContentCompressionResistancePriority(.required, for: .vertical)
|
||||
} else {
|
||||
setContentHuggingPriority(.required, for: .horizontal)
|
||||
setContentHuggingPriority(.defaultLow, for: .vertical)
|
||||
setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
|
||||
@ -74,6 +74,7 @@ public class LineModel: MoleculeModelProtocol, Invertable {
|
||||
|
||||
public init(verticalLineOf type: Style) {
|
||||
self.type = type
|
||||
orientation = .vertical
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user