x3dom / apps-modeling

Publicly Available Applications
Other
3 stars 3 forks source link

[plant_editor] USEing an inline node doesn't work (?) #113

Closed mlimper closed 10 years ago

mlimper commented 10 years ago

@yjung could you take a brief look at this? I have marked the code which is affected: https://github.com/x3dom/apps-modeling/blob/master/editor/plant_editor/js/Component.js#L61

You can change the commented section to use version A (the DEF/USE version), launch the plant editor and check the DOM elements of the page - in my understanding it should actually work like this.

Did I maybe forget something important?

Thanks a lot in advance.

yjung commented 10 years ago

USE attribute must be set before adding node to tree.

yjung commented 10 years ago

And BTW, please update also x3dom regularily, at least once a day.

mlimper commented 10 years ago

The bug you just fixed in X3DOM (_x3domNode undefined) was after the issue occured, so there was no chance to see how it works, because I always had the error console switched on, where there was a break for both cases, setting "USE" before and setting "USE" after adding the node to the tree. I tried both because I guessed it must be something like this.

Anyway, thanks for the quick help!

mlimper commented 10 years ago

I am sorry I have to bother you again: The solution is not really working, after adding multiple elements you have another bug: https://github.com/x3dom/x3dom/issues/220

For the example, I have just inserted a

    console.log("Primitive with ID " + id + " picked!");

In the "primitivePicked" function of "PrimitiveManager.js", in line 750.

(I assume this is an X3DOM issue, therefore it was filed it in the X3DOM issue tracker.)

yjung commented 10 years ago

Known issue, can't fix this, each Shape has one unique id.

mlimper commented 10 years ago

Can we continue discussing in the X3DOM thread? I'll post my answer over there.