You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var config = {
type: Phaser.WEBGL,
parent: 'phaser-example',
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
function preload ()
{
this.load.image('eye', 'assets/pics/lance-overdose-loader-eye.png');
}
function create ()
{
var image = this.add.sprite(200, 300, 'eye').setInteractive();
this.input.setDraggable(image);
// The pointer has to move 16 pixels before it's considered as a drag
this.input.dragDistanceThreshold = 50;
this.input.dragTimeThreshold = 200; // or/or-with
this.input.on('dragstart', function (pointer, gameObject) {
console.warn('dargStart');
gameObject.setTint(0xff0000);
});
this.input.on('drag', function (pointer, gameObject, dragX, dragY) {
console.warn('drag');
gameObject.x = dragX;
gameObject.y = dragY;
});
this.input.on('dragend', function (pointer, gameObject) {
console.warn('dargend');
gameObject.clearTint();
});
}
after clicking on the sprite
i see in console dragEnd
it seems bug
The text was updated successfully, but these errors were encountered:
RollinSafary
changed the title
BUG: dragend after setting dragDistanceThreshold
BUG: dragend after setting dragDistanceThreshold or dragTimeThreshold
May 22, 2018
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Phaser v3.8.0
after clicking on the sprite
i see in console
dragEnd
it seems bug
The text was updated successfully, but these errors were encountered: