enthought / enthought/mayavi

html tag error when export x3d

Open
#751 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

I'm using py2.7 and VTK8.1 and mayavi in jupyter notebook on mac, x3d output can be shown properly in notebook cells but once I export notebook to html, the order of html tags in x3d section would change, the ending tags are at wrong position.
Tags can be closed normally until x3d->scene, as is shown below:
![image](https://user-images.githubusercontent.com/32444405/50858596-b01ef200-1345-11e9-83ef-fa3719c09943.png)
But inside scene, when the tags should be parallel:
![screen shot 2019-01-08 at 1 14 02 pm](https://user-images.githubusercontent.com/32444405/50859161-7353fa80-1347-11e9-894f-0c60fc1cd8b8.png)
the output html treats them with different level:
![screen shot 2019-01-08 at 1 16 26 pm](https://user-images.githubusercontent.com/32444405/50859238-abf3d400-1347-11e9-97f8-9c1f635508b9.png)

Replace the counterpart in html manually will solve this question.

If I use mlab.savefig("xxx.x3d"), tags will be closed with /> at right place:
`


`
(And that is actually what happened to output html of jupyter notebook), but when I import this to x3d viewer, like this chrome extension(blender does not work on my mac )
https://chrome.google.com/webstore/detail/x3d-viewer/hjglnfapllnalfggjeeieeobhjmieail?hl=en-US
the situation becomes the same as wrong closing tag positions.

On the other hand, the x3d output of first cell below can display normally in exported html:

![image](https://user-images.githubusercontent.com/32444405/51001556-450c2180-14e5-11e9-868f-2ecf94f94b27.png)

![image](https://user-images.githubusercontent.com/32444405/51001530-2f96f780-14e5-11e9-8795-a55c1a9a4ccb.png)

Is this related to mayavi or x3d itself? Could anyone give any clue? Thank you very much!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.