| Get line number from ruler [message #869204] |
Thu, 03 May 2012 00:10  |
Joe Ertaba Messages: 17 Registered: April 2012 |
Junior Member |
|
|
Hi,
In some editors it is possible to select lines by clicking on numbers in ruler area. I was wondering if there is any plan for this feature.
If not is there any easy way to get notified when user click on the ruler. Right now to get the according number I do this:
window.document.
getElementsByClassName("textviewLeftRuler")[0].
addEventListener("click", function (event){
var num = parseInt(event.originalTarget.textContent)
},true)
[Updated on: Thu, 03 May 2012 00:10] Report message to a moderator
|
|
|
|
|
|
|
|
| Re: Get line number from ruler [message #870387 is a reply to message #870378] |
Mon, 07 May 2012 17:51  |
Joe Ertaba Messages: 17 Registered: April 2012 |
Junior Member |
|
|
Actually the current event listeners are just enough. I just don't want to replace them with new functions and then call the old ones afterwards. Sometime this can cause unknown behavior.
Anyhow, either a function to get the html element of rulers or addEventListener API for rulers seems the right solution to me.
|
|
|
Powered by
FUDForum. Page generated in 0.01923 seconds