工具条配置
<h1>工具条配置</h1>
<h2>1. 控制工具条的显示与隐藏</h2>
<p><strong>接口</strong>:<code>toggleToolbar</code></p>
<p><strong>参数说明</strong>:</p>
<ul>
<li><strong>flag</strong>: 必选,布尔值。
<ul>
<li><code>true</code> 代表显示工具条。</li>
<li><code>false</code> 代表隐藏工具条。</li>
</ul></li>
</ul>
<p><strong>示例代码</strong>:</p>
<pre><code class="language-javascript">var application2dConfig = new BCore2DFast.Application.Application2DConfig();
application2dConfig.language = language; // 设置语言
var mApplication2D = new BCore2DFast.Application.Application2D(application2dConfig);
let mViewer2D = new BCore2DFast.Viewerer2D('bcorecontainer-2d', new BCore2DF.Viewer.Viewer2DConfig());
// 隐藏工具条
mApplication2D.toggleToolbar(false);</code></pre>
<hr />
<h2>2. 工具条配置</h2>
<p><strong>接口</strong>:<code>setToolbarsConfig</code>
工具条配置方法,用于控制工具条的功能点</p>
<p><strong>参数说明</strong>:</p>
<ul>
<li><strong>tools</strong>: 必选,数组。
<ul>
<li>可选项包括: <code>'FullScreen'</code>, <code>'Layer'</code>, <code>'Measure'</code>, <code>'Annotate'</code>。传入希望显示的功能,不传则默认不显示。</li>
</ul></li>
</ul>
<p><strong>示例代码</strong>:</p>
<pre><code class="language-javascript">var application2dConfig = new BCore2DFast.Application.Application2DConfig();
application2dConfig.language = language; // 设置语言
var mApplication2D = new BCore2DFast.Application.Application2D(application2dConfig);
let mViewer2D = new BCore2DFast.Viewer.Viewer2D('bcorecontainer-2d', new BCore2DFast.Viewer.Viewer2DConfig());
// 设置工具条功能点
mApplication2D.setToolbarsConfig([ 'FullScreen', 'Layer', 'Measure', 'Annotate' ]);</code></pre>
<hr />