Fixing moleculeLayoutUpdate for tableView
This commit is contained in:
parent
3af89dfdc6
commit
0c7a4bf62c
@ -185,7 +185,8 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
open override func moleculeLayoutUpdated(_ molecule: MoleculeViewProtocol) {
|
open override func moleculeLayoutUpdated(_ molecule: MoleculeViewProtocol) {
|
||||||
guard let tableView = tableView else { return }
|
guard let tableView = tableView else { return }
|
||||||
|
|
||||||
let point = molecule.convert(molecule.bounds.origin, to: tableView)
|
var point = molecule.convert(molecule.bounds.origin, to: tableView)
|
||||||
|
point = CGPoint(x: ceil(point.x), y: ceil(point.y))
|
||||||
if let indexPath = tableView.indexPathForRow(at: point), tableView.indexPathsForVisibleRows?.contains(indexPath) ?? false {
|
if let indexPath = tableView.indexPathForRow(at: point), tableView.indexPathsForVisibleRows?.contains(indexPath) ?? false {
|
||||||
performTableViewUpdates()
|
performTableViewUpdates()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user