Permalink
Browse files

Update for latest Urweb.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
  • Loading branch information...
1 parent 5c165e5 commit 8faa78cc5b0a8b565b8df3b7ee0b8230b9f62763 @ezyang committed Mar 16, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −6 ffi.js
  2. +2 −1 logitext.ur
  3. +1 −0 style.css
View
10 ffi.js
@@ -1,15 +1,13 @@
/* Don't use append; interacts poorly with Urweb embedded objects
* due to how scripts work. */
+// known infelicity: does weird shit if the item you are dragging leaves
+// the screen; this is because the /scroller/ activates. You can fix
+// this by doing overflow:hidden
function infinitedrag(draggable, contents) {
jQuery.infinitedrag("#" + draggable, {}, {width: 800, height: 500, oncreate: function(el, col, row) {
if (col == 0 && row == 0) {
- div = document.createElement('div');
- div.innerHTML = contents;
- for (var i = 0; i < div.childNodes.length; i++) {
- el["0"].appendChild(div.childNodes[i]);
- }
- runScripts(el["0"]);
+ setInnerHTML(el["0"], contents);
el.addClass("zeropoint");
}
}});
View
@@ -1,5 +1,6 @@
style sequent
style preview
+style viewport
con state = int
datatype action = Inc | Dec
@@ -63,7 +64,7 @@ fun main () =
<link rel="stylesheet" type="text/css" href="http://localhost/logitext/style.css" />
</head>
<body onload={Js.infinitedrag seqid tbl}>
- <div>
+ <div class={viewport}>
<div id={seqid} class={sequent}>&nbsp;</div>
</div>
</body>
View
@@ -1,4 +1,5 @@
.zeropoint { z-index: 10; }
+.viewport { height:500px; width:800px; overflow:hidden; border:1px #CCC solid; }
.sequent { }
.sequent table { margin:0; border-collapse:collapse; }
.sequent td { padding:0; border:0; margin:0; height:2em; text-align:center; }

0 comments on commit 8faa78c

Please sign in to comment.