mirror of
https://github.com/wassname/phaser.git
synced 2026-09-10 12:29:30 +08:00
* Updated: event.preventDefault() has been added to all Mouse event handlers.
* Updated: Sprite.deltaX/Y removed due to non-use. prevX/Y values moved to Sprite._cache.prevX/Y. * Updated: Due to missing extends parameter the Sprite prototype was picking up functions from classes it never meant to (Button, TilemapLayer), now fully isolated.
This commit is contained in:
@@ -117,6 +117,8 @@ Phaser.Mouse.prototype = {
|
||||
*/
|
||||
onMouseDown: function (event) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
if (this.mouseDownCallback)
|
||||
{
|
||||
this.mouseDownCallback.call(this.callbackContext, event);
|
||||
@@ -140,6 +142,8 @@ Phaser.Mouse.prototype = {
|
||||
*/
|
||||
onMouseMove: function (event) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
if (this.mouseMoveCallback)
|
||||
{
|
||||
this.mouseMoveCallback.call(this.callbackContext, event);
|
||||
@@ -163,6 +167,8 @@ Phaser.Mouse.prototype = {
|
||||
*/
|
||||
onMouseUp: function (event) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
if (this.mouseUpCallback)
|
||||
{
|
||||
this.mouseUpCallback.call(this.callbackContext, event);
|
||||
|
||||
Reference in New Issue
Block a user