opensourceBIM / bimvie.ws

Javascript client for Building Information Modelling, using open standards like IFC, BCF and BIMSie. Using Bootstrap, BIM Surfer, etc..
GNU Affero General Public License v3.0
171 stars 87 forks source link

pagechanger callbacks are not reached with arguments #79

Open sundayez opened 7 years ago

sundayez commented 7 years ago

Hello:

I was trying to modify the code in main.html, line 103, to implement a callback response once a Project instance is created.

After doing a call such as ?page=Project, as far as I see, the responsible to call to this callback is pagechanger.js, line 22:

callback.call(othis.current);

where, othis.current is a Project instance that I was expecting to have back as an argument, but instead of it I find undefined.

Since the first argument of function.prototype.call method is this, wouldn't be correct to write this in order to access to the project from main.html?

pagechanger.js (line 22): callback.call(null, othis.current); (null or whatever) main.html (line 102): othis.showProject(history.poid, function(projectback){

Using this solution works for me to have projectback in main.html, and I was wondering if this is a real issue. Just in case I opened it.

Thank you