Minor code refactoring

This commit is contained in:
sasensi 2018-10-17 12:05:56 +02:00 committed by Jürg Lehni
parent 1bd67b2d9b
commit 3fd73f92f2
2 changed files with 6 additions and 17 deletions

View file

@ -1506,22 +1506,11 @@ new function() { // Injection scope for event handling on the browser
* test. * test.
* @private * @private
*/ */
_clearState: function() { _resetState: function() {
prevFocus = null; dragging = mouseDown = called = wasInView = false;
tempFocus = null; prevFocus = tempFocus = overView = downPoint = lastPoint =
dragging = false; downItem = overItem = dragItem = clickItem = clickTime =
mouseDown = false; dblClick = null;
called = false;
wasInView = false;
overView = null;
downPoint = null;
lastPoint = null;
downItem = null;
overItem = null;
dragItem = null;
clickItem = null;
clickTime = null;
dblClick = null;
} }
} }
}; };

View file

@ -69,7 +69,7 @@ var test = function(testName, expected) {
currentProject.remove(); currentProject.remove();
// This is needed for interactions tests, to make sure that test is // This is needed for interactions tests, to make sure that test is
// run with a fresh state. // run with a fresh state.
View._clearState(); View._resetState();
} }
// Instantiate project with 100x100 pixels canvas instead of default // Instantiate project with 100x100 pixels canvas instead of default