minor fixes
This commit is contained in:
parent
f85c1b9758
commit
c19476b824
3 changed files with 7 additions and 5 deletions
|
|
@ -168,6 +168,7 @@ function Editor(doc, renderer)
|
|||
addListener(container, "mousedown", function(e) {
|
||||
textInput.focus();
|
||||
self.placeCursorToMouse(e.pageX, e.pageY);
|
||||
self.renderer.scrollCursorIntoView();
|
||||
return preventDefault(e);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
function VirtualRenderer(containerId)
|
||||
{
|
||||
DumbRenderer.call(this, containerId);
|
||||
|
||||
this.scrollTop = 0;
|
||||
this.firstRow = 0;
|
||||
|
||||
|
|
@ -24,6 +25,7 @@ function VirtualRenderer(containerId)
|
|||
update: this.updateMarkers
|
||||
});
|
||||
}
|
||||
|
||||
inherits(VirtualRenderer, DumbRenderer);
|
||||
|
||||
VirtualRenderer.prototype.draw = function()
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@
|
|||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.composition {
|
||||
|
|
@ -105,10 +106,8 @@
|
|||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
var doc = new TextDocument("Juhu Kinners");
|
||||
|
||||
new Editor(doc, new VirtualRenderer("virtual_container"));
|
||||
new Editor(doc, new DumbRenderer("container"));
|
||||
new Editor(new TextDocument("Juhu Kinners"), new VirtualRenderer("virtual_container"));
|
||||
new Editor(new TextDocument("Juhu Kinners"), new DumbRenderer("container"));
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue