added throttling to mousemove and touchmove. Added logic to prevent Android from detecting both touch and mouse events

This commit is contained in:
Eric Rowell
2014-02-26 08:46:26 -08:00
parent c2e138c6f4
commit 8fcd882ba5
2 changed files with 118 additions and 105 deletions

View File

@@ -1,40 +1,43 @@
suite('DragAndDrop', function() {
// ======================================================
test('test drag and drop properties and methods', function() {
var stage = addStage();
var layer = new Kinetic.Layer();
var circle = new Kinetic.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: 'green',
stroke: 'black',
strokeWidth: 4,
name: 'myCircle'
});
test('test drag and drop properties and methods', function(done) {
var stage = addStage();
var layer = new Kinetic.Layer();
var circle = new Kinetic.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: 'green',
stroke: 'black',
strokeWidth: 4,
name: 'myCircle'
});
stage.add(layer);
layer.add(circle);
setTimeout(function() {
layer.draw();
// test defaults
//assert.equal(circle.draggable(), false);
layer.draw();
//change properties
circle.setDraggable(true);
// test defaults
assert.equal(circle.draggable(), false);
//change properties
circle.setDraggable(true);
//circle.on('click', function(){});
//circle.on('click', function(){});
layer.draw();
layer.draw();
showHit(layer);
showHit(layer);
// test new properties
//assert.equal(circle.getDraggable(), true);
// test new properties
assert.equal(circle.getDraggable(), true);
done();
}, 50);
});