@@ -321,7 +321,16 @@ TestCase {
321 event.commit()
321 event.commit()
324+ /*! \brief Tap the item with a touch event.
326+ \param item The item to be tapped
327+ \param x The x coordinate of the tap, defaults to horizontal center
328+ \param y The y coordinate of the tap, defaults to vertical center
324 function tap(item, x, y) {
330 function tap(item, x, y) {
331+ if (typeof x !== "number") x = item.width / 2;
332+ if (typeof y !== "number") y = item.height / 2;
325 var root = fetchRootItem(item)
334 var root = fetchRootItem(item)
326 var rootPoint = item.mapToItem(root, x, y)
335 var rootPoint = item.mapToItem(root, x, y)