I am trying to adjust the buttons to only show the navigation tools when the device is a mobile phone. I'm using the following code:
viewer.toolbar.getControl('settingsTools').setVisible(false);
viewer.toolbar.getControl('modelTools').setVisible(false);
viewer.toolbar.getControl('navTools').setVisible(true);
viewer.toolbar.getControl('navTools').getControl('toolbar-orbitTools').setVisible(true);
But then it will remove the visible buttons which were the SettingsTools and half of the modelTools. But it won't show the navTools.
In the HTML I see that the buttons are still giving a css tag display: none
How can I make this work?
EDIT: I have changed the logic to directly change the CSS (display = none or block) as per this example http://through-the-interface.typepad.com/through_the_interface/2017/03/hiding-unwanted-toolbar-items-in-the-forge-viewer.html.
Using this causes the button to be arranged and styled weird. Is there a method I need to call to let the viewer update its outlining etc?
答案 0 :(得分:0)
我发现它在使用Google Chrome和查看器v2.13的Android 6.0设备上也能正常运行。我没有解释设备中按钮控件的可见性。
如果您能提供可重复的案例证明,我很乐意将其传递给开发团队进行分析。以下项目应在可重现的案例中:
如果您的可复制案例无法在此公开发布,请在发送之前将其发送至forge.help@autodesk.com
并删除敏感数据或信息。