Screen Shot 2017-02-15 at 6.34.21 PM

 

Drag an image to trigger an action. You can define a target that must be reached for the action to occur, but you can also define the action to occur when the target is missed or left. You can set the drag widget to only be dragged horizontally or vertically and you can tell it to act as a wall (meaning, Gyro and Drifter widgets that will touch it, will bounce back).

 

The most interesting ability of Drag is that it can have a target. That target can be any other widget in the same page, and is interacted with by a set of special triggers:

  1. On Over Target: what happens when you drag the Drag over the target. It’s okay that you’re still holding on to it.
  2. On Drop Target: what happens when you drop the Drag over the target. Here it’s not okay that you’re still holding on to it. The action will not occur until you let go.
  3. On Out Target: what happens when you were over the target; but now you’re moving away. It’s okay that you’re still holding on to it.
  4. On Miss Target: what happens when you drop the Drag anywhere that isn’t on the target. Here it’s not okay that you’re still holding on to it. The action will not occur until you let go.

! For all these triggers, please note that what counts are the widget’s official outlines, so if your widget is rotated or mostly transparent, it could lead to some confusion.

Was this article helpful to you?

One Response to “Drag”

  1. Gyro, Drifter & Wall | justAd Knowledge BasejustAd Knowledge Base

    […] be rotated, not even by a trigger, because their collision is calculated from the original outline. Drag can be rotated, but if you use it as a wall it’s best not to rotate it, as the difference between […]

Comments are closed.