doc-vtk: fix scrolling
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
<style>
|
<style>
|
||||||
.vtk-viewer {
|
.vtk-viewer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 70%;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #bbb;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script src="vtk.js"></script>
|
<script src="vtk.js"></script>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
parent_element.appendChild(container);
|
parent_element.appendChild(container);
|
||||||
container.addEventListener('mouseenter', enterCurrentRenderer);
|
container.addEventListener('mouseenter', enterCurrentRenderer);
|
||||||
container.addEventListener('mouseleave', exitCurrentRenderer);
|
container.addEventListener('mouseleave', exitCurrentRenderer);
|
||||||
// container.id = ID;
|
container.id = ID;
|
||||||
|
|
||||||
renderWindow.addRenderer(renderer);
|
renderWindow.addRenderer(renderer);
|
||||||
updateViewPort(container, renderer);
|
updateViewPort(container, renderer);
|
||||||
@@ -189,8 +189,14 @@
|
|||||||
"shape": pinephone_case
|
"shape": pinephone_case
|
||||||
}];
|
}];
|
||||||
render(pinephone_case_options, parent_element);
|
render(pinephone_case_options, parent_element);
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div class="vtk-viewer">
|
||||||
|
<script>
|
||||||
|
var parent_element = document.currentScript.parentNode;
|
||||||
|
|
||||||
var pinephone_case_with_phone_options = [{
|
var pinephone_case_with_phone_options = [
|
||||||
|
{
|
||||||
"color": [ 1.0, 0.8, 0.0, 1.0 ],
|
"color": [ 1.0, 0.8, 0.0, 1.0 ],
|
||||||
"position": [ 0.0, 0.0, 0.0 ],
|
"position": [ 0.0, 0.0, 0.0 ],
|
||||||
"orientation": [ 0.0, 0.0, 0.0 ],
|
"orientation": [ 0.0, 0.0, 0.0 ],
|
||||||
@@ -201,7 +207,8 @@
|
|||||||
"position": [ 0.0, 0.0, 0.0 ],
|
"position": [ 0.0, 0.0, 0.0 ],
|
||||||
"orientation": [ 0.0, 0.0, 0.0 ],
|
"orientation": [ 0.0, 0.0, 0.0 ],
|
||||||
"shape": pinephone_phone
|
"shape": pinephone_phone
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
render(pinephone_case_with_phone_options, parent_element);
|
render(pinephone_case_with_phone_options, parent_element);
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user