| 381 | } |
| 382 | |
| 383 | void CADrawerController::ccTouchEnded(CATouch *pTouch, CAEvent *pEvent) |
| 384 | { |
| 385 | if (m_bShow |
| 386 | && !(m_fOffX > FLT_EPSILON) |
| 387 | && m_pContainer[1]->getFrame().containsPoint(this->getView()->convertTouchToNodeSpace(pTouch))) |
| 388 | { |
| 389 | this->hideLeftViewController(true); |
| 390 | } |
| 391 | else if (std::abs(m_fOffX) > FLT_EPSILON) |
| 392 | { |
| 393 | if (m_fOffX > 0) |
| 394 | { |
| 395 | this->showLeftViewController(true); |
| 396 | } |
| 397 | else |
| 398 | { |
| 399 | this->hideLeftViewController(true); |
| 400 | } |
| 401 | } |
| 402 | else |
| 403 | { |
| 404 | if (m_fCurrDivision > m_fDivision / 2) |
| 405 | { |
| 406 | this->showLeftViewController(true); |
| 407 | } |
| 408 | else |
| 409 | { |
| 410 | this->hideLeftViewController(true); |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | m_fOffX = 0; |
| 415 | } |
| 416 | |
| 417 | void CADrawerController::ccTouchCancelled(CATouch *pTouch, CAEvent *pEvent) |
| 418 | { |
no test coverage detected