4.2 Interaction 交互 - Drag 拖拽


Drag a layer in any direction. Choose the layer to drag and then connect the Position output to the layer's Position port.
向任意方向拖拽图层。将Drag模块的输出口Position连接到要拖拽的图层的Position属性。

输入口

Enable 开启
A boolean that is true when dragging is enabled
拖拽能启用时布尔值为真。

Layer 图层
The name of the layer to drag. Click the value (“None�, by default) to select a layer. Controls which layer activates drag on touch.
拖拽图层名称。点击Layer的值选择图层。触摸哪个图层激活拖拽。
(板栗:有A、B两个图层,Drag的输出口连接的A的位置属性,Drag的Layer选择为图层B,那触摸B可以拖动A,如果触摸B意外的范围就拖不动。不选就是触摸整个屏幕激活图层的拖拽。)

Start 开始
The position the layer starts at when the prototype starts.
当原型开始时,被拖拽的图层的位置。

Reset 重置
A pulse that resets the position to the start position.
重置到启动位置。 (板栗:Start设置的位置。)

Settings 设置
The settings from a Drag Settings patch that further customize drag behavior.
从Drag Setting模块进一步自定义拖动行为的设置。

输出口

Position 位置
The current position of the draggable layer.
拖动层的当前位置。(板栗:就是这个接口连接到要拖的图层位置属性)


Related Patches 相关模块

Drag Settings


Related Examples 案例

Instagram Adjust
Use drag to control the Instagram straighten tool.


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容