wip
This commit is contained in:
parent
43a8b9cfe8
commit
bf603b51db
|
@ -95,18 +95,15 @@ extension PlatformEntity {
|
||||||
|
|
||||||
@_spi(Internals)
|
@_spi(Internals)
|
||||||
public func descendantsBetween(_ bottomEntity: Base, and topEntity: Base) -> [Base] {
|
public func descendantsBetween(_ bottomEntity: Base, and topEntity: Base) -> [Base] {
|
||||||
var entered = false
|
|
||||||
var result: [Base] = []
|
var result: [Base] = []
|
||||||
|
var entered = false
|
||||||
|
|
||||||
for descendant in self.allDescendants {
|
for descendant in self.allDescendants {
|
||||||
if descendant === bottomEntity {
|
if descendant === bottomEntity {
|
||||||
entered = true
|
entered = true
|
||||||
continue
|
} else if descendant === topEntity {
|
||||||
}
|
break
|
||||||
if descendant === topEntity {
|
} else if entered {
|
||||||
return result
|
|
||||||
}
|
|
||||||
if entered {
|
|
||||||
result.append(descendant)
|
result.append(descendant)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue