简体   繁体   English

在Forge Autodesk中更改模型结构面板的大小

[英]Change size of model structure panel in Forge Autodesk

I want to change the size of the model structure panel inside Forge Autodesk. 我想在Forge Autodesk中更改模型结构面板的大小。 I have been looking for the good 'height' parameter in the code, but I do not find anything related to that... 我一直在代码中寻找良好的'height'参数,但没有找到任何与此相关的...

Among dynamic extensions, I have tried with DataTreeView.scss, HierarchyTreeView.scss, SelectTreeView.scss, even ModelLoader... 在动态扩展中,我尝试使用DataTreeView.scss,HierarchyTreeView.scss,SelectTreeView.scss甚至是ModelLoader ...

Maybe the model structure panel's size is generated and not written in the code ? 也许是生成了模型结构面板的大小,而不是将其写在代码中? Does anyone know how I could change it, from the code ? 有谁知道我可以从代码中更改它?

You need to understand the code you are referring to ( Forge RDCB ) is a sample, this is NOT part of the viewer and its API directly. 您需要了解您所引用的代码( Forge RDCB )只是示例,它不是查看器及其API的一部分。 It provide examples using the viewer and other Forge APIs. 它提供了使用查看器和其他Forge API的示例。 Some of the extensions may alter some of the default styles of the viewer through custom css and some others implement custom UI using the viewer components, such as treeview but you will not find what you are looking for in those examples. 一些扩展可能会通过自定义css更改查看器的某些默认样式,而其他一些扩展会使用查看器组件来实现自定义UI,例如treeview,但在这些示例中您将找不到所需的内容。

In order to modify the native panels of the viewer you need to add to your app some custom css. 为了修改查看器的本机面板,您需要向您的应用添加一些自定义CSS。 To find out what css properties/classes you have to overwrite, you can use Chrome developer tools, especially the Elements tab as illustrated in the picture below. 要找出必须覆盖哪些CSS属性/类,可以使用Chrome开发人员工具,尤其是下图所示的Elements标签。 Mastering that tool will help you save a lot of time when it comes to overwriting the default css. 掌握该工具将帮助您节省很多时间来覆盖默认的CSS。

在此处输入图片说明

You can find the implementation of the viewer at https://developer.api.autodesk.com/derivativeservice/v2/viewers/viewer3D.js 您可以在https://developer.api.autodesk.com/derivativeservice/v2/viewers/viewer3D.js中找到查看器的实现。

And the associated default css at https://developer.api.autodesk.com/derivativeservice/v2/viewers/style.css 以及相关的默认CSS, 网址https://developer.api.autodesk.com/derivativeservice/v2/viewers/style.css

Also it's not clear what you mean by change the size of the model structure panel ... If you want to set the default width/height of that panel then you probably need to add the following css: 同样也不清楚改变模型结构面板的尺寸是什么意思。如果要设置该面板的默认宽度/高度,则可能需要添加以下css:

.docking-panel.model-structure-panel {
   height: 500px !important;
   width: 500px !important;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM