jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
951 stars 188 forks source link

Dont use requirejs path #35

Closed SylvainCorlay closed 8 years ago

SylvainCorlay commented 8 years ago

Currently, pythreejs adds some paths in requirejs' config.

The problem is that the target paths start with / witch removes the url prefix and makes pythreejs incompatible with any app that embeds the notebook with a URL prefix such as binder. (@jasongrout, the flight-simulator binder uses a patched version of pythreejs).

Because of https://github.com/jupyter/notebook/issues/626, we cannot simply remove the slashes, and it does not seem that this issue will be fixed

In this PR, I completely remove the use of requirejs paths, to the benefit of maps. It is a bit longer but should work in all situations.

SylvainCorlay commented 8 years ago

@jasongrout this fixes the base URL issue we were having with binder + pythreejs.

jasongrout commented 8 years ago

Thanks! This looks good to me, and seems to work great.

jasongrout commented 8 years ago

I pushed version 0.1.18 to pypi with this change.

SylvainCorlay commented 8 years ago

@jasongrout awesome. Updating the binder to use 0.1.18