small refactoring

This commit is contained in:
Anton Lavrenov
2019-11-12 14:38:36 -05:00
parent 633de7b779
commit 680ea026d8
14 changed files with 215 additions and 1409 deletions

View File

@@ -2071,7 +2071,7 @@ suite('MouseEvents', function() {
layer.draw();
var mousemove = 0;
rect.on('mousemove', () => {
rect.on('mousemove', function() {
mousemove += 1;
});

View File

@@ -532,12 +532,12 @@ suite('TouchEvents', function() {
var tap = 0;
var dbltap = 0;
stage.on('tap', e => {
stage.on('tap', function(e) {
assert.equal(e.target, circle1);
tap += 1;
});
stage.on('dbltap', e => {
stage.on('dbltap', function(e) {
assert.equal(e.target, circle1);
dbltap += 1;
});
@@ -584,16 +584,16 @@ suite('TouchEvents', function() {
var dbltap = 0;
var dragmove = 0;
stage.on('tap', e => {
stage.on('tap', function(e) {
assert.equal(e.target, circle1);
tap += 1;
});
stage.on('dbltap', e => {
stage.on('dbltap', function(e) {
dbltap += 1;
});
stage.on('dragmove', e => {
stage.on('dragmove', function(e) {
dragmove += 1;
});
@@ -645,14 +645,14 @@ suite('TouchEvents', function() {
var tap = 0;
var click = 0;
stage.on('tap', e => {
stage.on('tap', function(e) {
assert.equal(e.target, circle1);
assert.equal(stage.getPointerPosition().x, 100);
assert.equal(stage.getPointerPosition().y, 100);
tap += 1;
});
stage.on('click', e => {
stage.on('click', function(e) {
click += 1;
});