我想双击模型就触发事件查询模型信息,请问这个事件该怎么写?
var selection3Ds = scene.findSelection3Ds(true);
var layer = selection3Ds[0].get_layer3D();
// var id = selection3Ds[0].get_item(0);
var fieldInfo = "";
fieldCount = layer.get_fieldInfos().get_count();
for(var i=0;i<fieldCount;i++)
{
fieldInfo += layer.get_fieldInfos().get_item(i).get_name() + ":";
fieldInfo += layer.getFieldValue(i) + "; ";
}
alert(fieldInfo);