mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-12-22 08:37:24 +00:00
AttributesCollection#plus
This commit is contained in:
parent
a2eda2726b
commit
031d07d97a
@ -3,6 +3,7 @@
|
|||||||
## 0.0.38
|
## 0.0.38
|
||||||
|
|
||||||
* Add support of `Toggle`
|
* Add support of `Toggle`
|
||||||
|
* Attributes collection now can be concatenated
|
||||||
|
|
||||||
## 0.0.37
|
## 0.0.37
|
||||||
|
|
||||||
|
@ -15,6 +15,13 @@ class AttributesCollection<T : Element> (
|
|||||||
attrs()
|
attrs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
operator fun plus(other: AttributesCollection<T>) = AttributesCollection<T>(
|
||||||
|
*(modifiers + other.modifiers).distinct().toTypedArray()
|
||||||
|
) {
|
||||||
|
this@AttributesCollection.attrs.invoke(this)
|
||||||
|
other.attrs.invoke(this)
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val Empty = Attrs<Element>()
|
val Empty = Attrs<Element>()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user