Skip to content

Commit e4d2b42

Browse files
committed
Test Canvas Rotate
1 parent 206c2f3 commit e4d2b42

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

src/modules/CanvasRotate/CanvasRotate.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void CREditorUI::triggerSwipeMode() {
189189
}
190190

191191
bool CREditorUI::ccTouchBegan(CCTouch* touch, CCEvent* event) {
192-
/*auto module = CanvasRotate::get();
192+
auto module = CanvasRotate::get();
193193
Ref<CCTouch> touchRef = touch;
194194

195195
if (m_editorLayer->m_playbackMode == PlaybackMode::Playing) {
@@ -213,12 +213,11 @@ bool CREditorUI::ccTouchBegan(CCTouch* touch, CCEvent* event) {
213213
}
214214
auto ret = EditorUI::ccTouchBegan(touchRef, event);
215215
m_toolbarHeight = CanvasRotate::get()->m_realToolbarHeight;
216-
return ret;*/
217-
return EditorUI::ccTouchBegan(touch, event);
216+
return ret;
218217
}
219218

220219
void CREditorUI::ccTouchMoved(CCTouch* touch, CCEvent* event) {
221-
/*auto module = CanvasRotate::get();
220+
auto module = CanvasRotate::get();
222221
Ref<CCTouch> touchRef = touch;
223222

224223
if (m_swipeActive || CanvasRotate::get()->isLassoActive()) {
@@ -228,12 +227,11 @@ void CREditorUI::ccTouchMoved(CCTouch* touch, CCEvent* event) {
228227
module->m_preTransformTouch[touchRef] = touchRef->getLocation();
229228

230229
module->m_rotationNode->translate(touchRef);
231-
EditorUI::ccTouchMoved(touchRef, event);*/
232-
EditorUI::ccTouchMoved(touch, event);
230+
EditorUI::ccTouchMoved(touchRef, event);
233231
}
234232

235233
void CREditorUI::ccTouchEnded(CCTouch* touch, CCEvent* event) {
236-
/*auto module = CanvasRotate::get();
234+
auto module = CanvasRotate::get();
237235
Ref<CCTouch> touchRef = touch;
238236

239237
auto fields = m_fields.self();
@@ -242,8 +240,7 @@ void CREditorUI::ccTouchEnded(CCTouch* touch, CCEvent* event) {
242240
module->m_rotationNode->translate(touchRef);
243241
EditorUI::ccTouchEnded(touchRef, event);
244242

245-
module->m_preTransformTouch.erase(touchRef);*/
246-
EditorUI::ccTouchEnded(touch, event);
243+
module->m_preTransformTouch.erase(touchRef);
247244
}
248245

249246
CCArray* CRLevelEditorLayer::objectsInRect(CCRect rect, bool ignoreLayerCheck) {

0 commit comments

Comments
 (0)