fixed bug with insert-right that was causing broken invariant
This commit is contained in:
parent
e30a1d0be1
commit
6b78d5154f
|
@ -131,30 +131,34 @@
|
|||
|
||||
(view->xexp
|
||||
(view-insert-right
|
||||
(view-down (view-focus (->view (xexp->dom '(html (head)
|
||||
(body (h1 (@ (id "header")))
|
||||
(p (@ (id "para"))
|
||||
(ul (li "one")))))))
|
||||
"para"))
|
||||
(view-down
|
||||
(view-down
|
||||
(view-focus (->view (xexp->dom '(html (head)
|
||||
(body (h1 (@ (id "header")))
|
||||
(p (@ (id "para"))
|
||||
(ul (li "one")))))))
|
||||
"para")))
|
||||
(xexp->dom '(li "two"))))
|
||||
|
||||
|
||||
(view->xexp
|
||||
(view-insert-right
|
||||
(view-insert-right
|
||||
(view-down (view-focus (->view (xexp->dom '(html (head)
|
||||
(body (h1 (@ (id "header")))
|
||||
(p (@ (id "para"))
|
||||
(ul (li "one")))))))
|
||||
"para"))
|
||||
(view-down
|
||||
(view-down (view-focus (->view (xexp->dom '(html (head)
|
||||
(body (h1 (@ (id "header")))
|
||||
(p (@ (id "para"))
|
||||
(ul (li "one")))))))
|
||||
"para")))
|
||||
(xexp->dom '(li "two")))
|
||||
(xexp->dom '(li "three"))))
|
||||
|
||||
(view->xexp
|
||||
(view-insert-left
|
||||
(view-down (view-focus (->view (xexp->dom '(html (head)
|
||||
(body (h1 (@ (id "header")))
|
||||
(p (@ (id "para"))
|
||||
(ul (li "one")))))))
|
||||
"para"))
|
||||
(view-down
|
||||
(view-down (view-focus (->view (xexp->dom '(html (head)
|
||||
(body (h1 (@ (id "header")))
|
||||
(p (@ (id "para"))
|
||||
(ul (li "one")))))))
|
||||
"para")))
|
||||
(xexp->dom '(li "zero"))))
|
||||
|
|
|
@ -235,8 +235,6 @@
|
|||
MockView.prototype.updateCss = function(name, value) {
|
||||
return this.act(
|
||||
function(cursor) {
|
||||
console.log($(cursor.node[0].cloneNode(false))
|
||||
.css(name, value).get(0));
|
||||
return cursor.replaceNode([$(cursor.node[0].cloneNode(false))
|
||||
.css(name, value).get(0)]
|
||||
.concat(cursor.node.slice(1)));
|
||||
|
|
|
@ -171,7 +171,7 @@ var TreeCursor = (function() {
|
|||
TreeCursor.prototype.insertRight = function(n) {
|
||||
return new TreeCursor(this.parent,
|
||||
n,
|
||||
this.prevs.concat(this.node),
|
||||
this.prevs.concat([this.node]),
|
||||
this.nexts,
|
||||
this.openF,
|
||||
this.closeF,
|
||||
|
|
Loading…
Reference in New Issue
Block a user