andreasplesch / x_ite_dom

link x_ite to the DOM
http://andreasplesch.github.io/x_ite_dom/index.xhtml
MIT License
6 stars 0 forks source link

Adding nodes #7

Closed andreasplesch closed 8 years ago

andreasplesch commented 8 years ago

Parser.pushParent(elparent.x3dnode)

Should suffice to parse new node into parent with Parser.statement()

If no parent, eg root node just skip push parent

Then perhaps necessary to popParent

but new Parser is created with empty parents [] for each mutation. but it is possible to have multiple added nodes in one mutation.

andreasplesch commented 8 years ago

parser.statement() works fine but it is still necessary to .setValue of the parent field.

andreasplesch commented 8 years ago

How to determine correct execution context?

Use parent's if it exists, eg. Non root node.

If root node, find closest inline and use getInternalScene.

andreasplesch commented 8 years ago

Root node.parent.parent.name == inline

Parser.pushexecutioncontext(inline.node.getInternalScene)