如何使用“处理精灵事件”来显示传感器数据的工具提示?

huangapple go评论57阅读模式
英文:

Autodesk Platform Services: How to display tooltip of sensor data using "Handling Sprite Events"?

问题

Autodesk Platform Services: 如何使用处理精灵事件显示传感器数据

我正在使用Autodesk平台服务(以前称为Forge)的数据可视化功能来创建一个物联网数据可视化查看器,如下所示。
开发者指南
在线演示
源代码

我想要创建一个工具提示功能,以通过点击传感器图标来显示详细的传感器数据,就像在开发者指南和下面的图片中所示。
然而,在准备好的源代码中并没有提供此功能。
(在SensorSpritesExtension.js中有一个处理类似点击事件的功能。)

从上述内容中,我想要了解两点:

  1. 是否有可用的示例源代码或演示,提供了类似图像中显示物联网传感器数据的鼠标点击事件处理过程?
  2. 如果第1点不可用,是否有可以参考的API参考、开发者指南或技术博客?
英文:

Autodesk Platform Services:How to display sensor data using Handling Sprite Events

 I'm working on creating an IoT data visualization viewer using the Data Visualization feature of Autodesk Platform Services(formerly Forge), which is featured below.
Developer's Guide
Live demo
Source code

I'd like to create a tooltip function to display detailed sensor data by clicking on the sensor icon, as shown in the Developer's Guide and the following image.
However, this functionality is not provided in the prepared source code.
(There is a function in SensorSpritesExtension.js for handling similar click events.)

如何使用“处理精灵事件”来显示传感器数据的工具提示?

**From the above, there are two points I would like to know.
**

  1. Is there a sample source code or demo available that provides a mouse click event process that displays IoT sensor data like the image?
  2. If 1. is not available, is there any API reference, Developer's Guide, or technical blog that we can refer to?

答案1

得分: 1

在GIF中显示的悬停工具提示是在旧的代码示例中实现的(https://github.com/Autodesk-Forge/forge-dataviz-iot-reference-app),但这个示例难以重用,这就是为什么我们建立了一个新的示例(https://github.com/autodesk-platform-services/aps-iot-extensions-demo)。在新的示例中,当您点击其图标时,将在自定义UI面板中显示各个传感器的图表。另外,要实现这种行为,新示例还使用了Autodesk.DataVisualization.Core.MOUSE_CLICK事件:https://github.com/autodesk-platform-services/aps-iot-extensions-demo/blob/464ce80637b8e258c1499a4569f53ab1aeb65203/public/extensions/SensorSpritesExtension.js#LL26C38-L26C81。

英文:

The hover tooltips shown in the GIFs were implemented in an older code sample (https://github.com/Autodesk-Forge/forge-dataviz-iot-reference-app), however this sample was difficult to reuse, which is why we built a new one (https://github.com/autodesk-platform-services/aps-iot-extensions-demo). In the new sample, the charts for individual sensors are displayed in a custom UI panel when you click on their icons. Btw. to implement this behavior, the new sample is also making use of the Autodesk.DataVisualization.Core.MOUSE_CLICK event: https://github.com/autodesk-platform-services/aps-iot-extensions-demo/blob/464ce80637b8e258c1499a4569f53ab1aeb65203/public/extensions/SensorSpritesExtension.js#LL26C38-L26C81.

huangapple
  • 本文由 发表于 2023年5月25日 18:23:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76331266.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定