|
@@ -77,6 +77,17 @@ private let _KMThumbnailView_collectionViewDrop_lineViewClassName = "NSCollectio
|
|
|
|
|
|
super.addSubview(view)
|
|
|
}
|
|
|
+
|
|
|
+ override func mouseDown(with event: NSEvent) {
|
|
|
+ let point = convert(event.locationInWindow, from: nil)
|
|
|
+
|
|
|
+ if let indexPath = indexPathForItem(at: point) {
|
|
|
+ // 用户点击了一个项,处理点击事件
|
|
|
+ super.mouseDown(with: event)
|
|
|
+ } else {
|
|
|
+ // 用户点击了空白区域,不取消选中项
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@objc class KMThumbnailView: NSView {
|