Merge branch 'multiCursor'
Conflicts: demo/kitchen-sink/demo.js lib/ace/test/all_browser.js
This commit is contained in:
commit
aed7ca654c
26 changed files with 1902 additions and 386 deletions
|
|
@ -794,6 +794,19 @@ var VirtualRenderer = function(container, theme) {
|
|||
// todo: handle horizontal scrolling
|
||||
};
|
||||
|
||||
this.pixelToScreenCoordinates = function(pageX, pageY) {
|
||||
var canvasPos = this.scroller.getBoundingClientRect();
|
||||
|
||||
var col = Math.round(
|
||||
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
|
||||
);
|
||||
var row = Math.floor(
|
||||
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
|
||||
);
|
||||
|
||||
return {row: row, column: col};
|
||||
};
|
||||
|
||||
this.screenToTextCoordinates = function(pageX, pageY) {
|
||||
var canvasPos = this.scroller.getBoundingClientRect();
|
||||
|
||||
|
|
@ -885,7 +898,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
return afterLoad(module);
|
||||
|
||||
_self._loadTheme(moduleName, function() {
|
||||
require([theme], function(module) {
|
||||
require([moduleName], function(module) {
|
||||
if (_self.$themeValue !== theme)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue