# 疊加層中添加遙控方向面板功能

**URL:** <https://forum.wise-paas.advantech.com/t/topic/229>\
**Category:** SaaSComposer\
**Tags:** knowledge-base, IoTSuiteSaaSComposer\
**Created:** [December 6, 2021, 9:01am UTC](https://forum.wise-paas.advantech.com/t/topic/229 "2021-12-06T09:01:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken\_Yek](https://avatars.discourse-cdn.com/v4/letter/k/87869e/32.png) [@Ken\_Yek](https://forum.wise-paas.advantech.com/u/Ken_Yek)\
**Post date:** [December 6, 2021, 9:01am UTC](https://forum.wise-paas.advantech.com/t/topic/229/1 "2021-12-06T09:01:37Z")

</div>

# 疊加層中添加遙控方向面板功能

[使用疊加層](https://docs.wise-paas.advantech.com/en/Guides_and_API_References/ApplicationServices/SaaS_Composer/1594876703547908721/v1.0.1) 說明請參照 Technical Documentation [連結](https://docs.wise-paas.advantech.com/en/Guides_and_API_References/ApplicationServices/SaaS_Composer/1594876703547908721/v1.0.1)

 ![3D_pan_rotate_control_layer](https://canada1.discourse-cdn.com/flex032/uploads/wisepaasforum/original/1X/14d6f6c0fcd8950f982142a369d5bb81d4046699.png)

平移代碼

> if(commonViewUtil.currentFiles[0]){  
> commonViewUtil.currentFiles[0].graphView.pan(0,-20,false,false)  
> }

說明:

> commonViewUtil.currentFiles[0] **// 選取疊加層中主3D圖**

從中選取 **graphView** ，呼叫 **pan** 平移。

旋轉代碼

> if(commonViewUtil.currentFiles[0]){  
> commonViewUtil.currentFiles[0].graphView.rotate(0,-1\*Math.PI/18, false, true)  
> }

從中選取 **graphView** ，呼叫 **rotate** 平移。
