MCPcopy Create free account
hub / github.com/9miao/CrossApp / ccTouchEnded

Method ccTouchEnded

CrossApp/controller/CADrawerController.cpp:383–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383void 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
417void CADrawerController::ccTouchCancelled(CATouch *pTouch, CAEvent *pEvent)
418{

Callers 1

ccTouchCancelledMethod · 0.95

Calls 5

containsPointMethod · 0.80
getViewMethod · 0.80

Tested by

no test coverage detected