问题描述
如何使用概述here的方法从我从vtkOBJImporter传递的k3d场景对象访问obj的(g)ID。
(g)应该是组名。但是,一旦vtkOBJImporter导入了组名,我就找不到vtk的文档。
解决方法
从当前的源代码(https://gitlab.kitware.com/vtk/vtk/-/blob/master/IO/Import/vtkOBJImporter.cxx#L275)看来,// When the page loads,make sure the already selected div is shown.
window.onload = function afterPageIsLoaded() {
showDiv();
}
function showDiv(element) {
// Create an array of all the hidden divs elements.
const hiddenDivs = [...document.querySelectorAll("div[id*='hidden_div']")];
// Loop over them and hide every one of them.
hiddenDivs.map(hiddenDiv => hiddenDiv.style.display = 'none');
// Get the selected id from the select.
const id = document.getElementById('test').value;
// Get the selected div and display it.
document.getElementById(id).style.display = 'block';
}
类型无法由g
处理。
随时打开功能请求(https://gitlab.kitware.com/vtk/vtk/-/issues/new?issue[assignee_id]=&issue[milestone_id]=)。甚至是合并请求:)