1. updateListener

作用: 截取用户在UI上触发的update事件。

1.1. 参数说明:

形式参数: 有

名称 说明 类型 是否必填 示例
key 批注key 字符串 string "123456"
parameter 批注信息 对象 Object 见下方
callback 回调函数 方法 function 见下方
返回值说明 类型 示例
无返回值 NULL NULL

1.1.1. 回调函数的参数:

名称 说明 类型 是否必须 示例
state 状态,为true时才会进行后续操作 布尔值 boolean true
name 批注name 字符串string "批注1"
key 批注key 字符串string 否,如果传递了该参数,那么 将用这个参数来更新批注 "123456"
parameter 批注信息 对象Object 否,如果传递了该参数,那么 将用这个参数来更新批注 见下方
var parameter = { 
cameraState: cameraState,//{Object} 对象,相机状态,包含position
componentState: componentState,   //{Array} 对象数组 , 构件信息,
highlightComponentsKeys: highlightComponentsKeys,    //{Array}数组,高亮的构件 key集合
highlightModelsKeys: highlightModelsKeys,    //{Array}数组,高亮的模型key集合 
imageURL: imgURL,    //{base64} 当前canvas的截图
width: w,    //{int} 图片宽度,当前canvas图片的宽度 
height: h,   //{int} 图片高度,当前canvas图片的高度 
num:  num,    //{int} 当前批注列表的序号
code: new Date().getTime().toString(), 
name: "批注" + num,    //批注名称
};

1.2. 调用方式:

postil.updateListener(key,parameter,  function  (state,key2,parameter2){});
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2021 all right reserved,powered by Gitbook该文件修订时间: 2021-12-20 09:59:48

results matching ""

    No results matching ""