editor is now full screen
This commit is contained in:
parent
83911a628a
commit
21a739a961
2 changed files with 15 additions and 20 deletions
|
|
@ -200,6 +200,10 @@ Editor.prototype =
|
||||||
this.renderer.updateCursor(this.cursor);
|
this.renderer.updateCursor(this.cursor);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resize : function() {
|
||||||
|
this.renderer.draw();
|
||||||
|
},
|
||||||
|
|
||||||
updateCursor : function() {
|
updateCursor : function() {
|
||||||
this.renderer.updateCursor(this.cursor);
|
this.renderer.updateCursor(this.cursor);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
31
editor.html
31
editor.html
|
|
@ -9,26 +9,15 @@
|
||||||
|
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
|
|
||||||
#virtual_container {
|
#container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
width: 600px;
|
top: 5px;
|
||||||
height: 400px;
|
right: 5px;
|
||||||
}
|
bottom: 5px;
|
||||||
|
left: 5px;
|
||||||
#virtual_container.focus {
|
|
||||||
border: 1px solid #327fbd;;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
position: absolute;
|
|
||||||
left: 630px;
|
|
||||||
border: 1px solid black;
|
|
||||||
overflow: auto;
|
|
||||||
width: 600px;
|
|
||||||
height: 400px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#container.focus {
|
#container.focus {
|
||||||
|
|
@ -98,15 +87,17 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="virtual_container">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
|
||||||
new Editor(new TextDocument("Juhu Kinners"), new VirtualRenderer("virtual_container"));
|
var editor = new Editor(new TextDocument("Juhu Kinners"), new VirtualRenderer("container"));
|
||||||
|
|
||||||
|
window.onresize = function() {
|
||||||
|
console.log("resize");
|
||||||
|
editor.resize();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue