Skip to content

Commit

Permalink
Updates to the libmei.plg
Browse files Browse the repository at this point in the history
Removed the (buggy) AddChildAtPosition
  • Loading branch information
ahankinson committed Sep 29, 2016
1 parent 518533d commit d6ffc8e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/libmei.plg
Original file line number Diff line number Diff line change
Expand Up @@ -1289,21 +1289,6 @@ GetChildren "(element) {
SetChildren "(element, childarr) {
element.children = childarr;
}"
AddChildAtPosition "(element, child, position) {
c = element.children;
r = CreateSparseArray();
// copy the children to the new array. Add two
// beyond the length since we'll be adding a new element.
for i = c.Length + 2 {
if (i = position) {
r[i] = child;
i = i + 1;
} else {
r[i] = c[i];
}
}
element.children = r;
}"
AddChild "(element, child) {
cid = child._id;
child._parent = element._id;
Expand Down

0 comments on commit d6ffc8e

Please sign in to comment.