mirror of
https://github.com/trudnai/Steve2.git
synced 2024-06-13 09:29:36 +00:00
BugFix: Mouse click on line calculation
This commit is contained in:
parent
0ac222ad3f
commit
143124f74a
|
@ -322,7 +322,8 @@ N V - B D I Z C
|
||||||
func getLine(inView view: NSTextView, forY: CGFloat) -> Int {
|
func getLine(inView view: NSTextView, forY: CGFloat) -> Int {
|
||||||
// var scrollTo = view.visibleRect.origin
|
// var scrollTo = view.visibleRect.origin
|
||||||
let lineSpacing = CGFloat(1.5)
|
let lineSpacing = CGFloat(1.5)
|
||||||
let lineHeight = view.font!.pointSize * lineSpacing
|
let fontPointSize = CGFloat(10) // view.font!.pointSize
|
||||||
|
let lineHeight = fontPointSize * lineSpacing
|
||||||
|
|
||||||
let line = round(forY) / lineHeight
|
let line = round(forY) / lineHeight
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user