mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Minor code refactoring
This commit is contained in:
parent
1bd67b2d9b
commit
3fd73f92f2
2 changed files with 6 additions and 17 deletions
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue