Add source node and rect for action

This commit is contained in:
Peter 2019-07-23 15:50:17 +01:00
parent b9cf73fb7b
commit 9142d3c231
2 changed files with 9 additions and 0 deletions

View File

@ -3825,6 +3825,12 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
} }
if let highlightedItemIndex = self.highlightedItemIndex { if let highlightedItemIndex = self.highlightedItemIndex {
for itemNode in self.itemNodes {
if itemNode.index == highlightedItemIndex {
itemNode.selected()
break
}
}
self.items[highlightedItemIndex].selected(listView: self) self.items[highlightedItemIndex].selected(listView: self)
} }
self.selectionTouchLocation = nil self.selectionTouchLocation = nil

View File

@ -523,6 +523,9 @@ open class ListViewItemNode: ASDisplayNode {
open func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) { open func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) {
} }
open func selected() {
}
open func isReorderable(at point: CGPoint) -> Bool { open func isReorderable(at point: CGPoint) -> Bool {
return false return false
} }