| 306 | } |
| 307 | |
| 308 | void NewClippingNodeTest::onTouchesMoved(const std::vector<Touch*>& touches, Event* event) |
| 309 | { |
| 310 | if (!_scrolling) |
| 311 | return; |
| 312 | Touch* touch = touches[0]; |
| 313 | auto clipper = this->getChildByTag(kTagClipperNode); |
| 314 | auto point = clipper->convertToNodeSpace(Director::getInstance()->convertToGL(touch->getLocationInView())); |
| 315 | Vec2 diff = point - _lastPoint; |
| 316 | auto content = clipper->getChildByTag(kTagContentNode); |
| 317 | content->setPosition(content->getPosition() + diff); |
| 318 | _lastPoint = point; |
| 319 | } |
| 320 | |
| 321 | void NewClippingNodeTest::onTouchesEnded(const std::vector<Touch*>& touches, Event* event) |
| 322 | { |
nothing calls this directly
no test coverage detected