removeNode();
parent = null;
if (oldparent != null) { Box b = oldparent; MARK_REFLOW_b; }
- if (oldparent != null) oldparent.putAndInvokeTraps("childremoved", this);
+ if (oldparent != null) oldparent.putAndTriggerJSTraps("childremoved", this);
}
/** Returns ith child */
}
if (redirect == null) {
- if (value == null) putAndTriggerTraps("childremoved", getChild(i));
+ if (value == null) putAndTriggerJSTraps("childremoved", getChild(i));
else Log.logJS(this, "attempt to add/remove children to/from a node with a null redirect");
} else if (redirect != this) {
- if (value != null) putAndTriggerTraps("childadded", b);
+ if (value != null) putAndTriggerJSTraps("childadded", value);
redirect.put(i, value);
if (value == null) {
- Box b = (Box)redirect.get(new Integer(i)) : (Box)value;
- if (b != null) putAndTriggerTraps("childremoved", b);
+ Box b = (Box)redirect.get(new Integer(i));
+ if (b != null) putAndTriggerJSTraps("childremoved", b);
}
} else if (value == null) {
- if (i < 0 || i > numChildren()) return;
+ if (i < 0 || i > numchildren) return;
Box b = getChild(i);
b.remove();
- putAndTriggerTraps("childremoved", b);
+ putAndTriggerJSTraps("childremoved", b);
} else {
Box b = (Box)value;
numchildren++;
Box before = getChild(i);
- if (before == null) root.peerTree_rightmost().insertAfterMe(b);
+ if (before == null) rootChild.peerTree_rightmost().insertAfterMe(b);
else before.insertBeforeMe(b);
// need both of these in case child was already uncalc'ed
MARK_REFLOW_b;
MARK_REFLOW;
- b.dirty();
- putAndTriggerTraps("childadded", b);
+ b.dirty();
+ putAndTriggerJSTraps("childadded", b);
}
}
}