Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in mouseConstraint #185

Closed
trsh opened this issue Dec 22, 2015 · 0 comments
Closed

Bug in mouseConstraint #185

trsh opened this issue Dec 22, 2015 · 0 comments
Labels

Comments

@trsh
Copy link

trsh commented Dec 22, 2015

if (!mouse && engine && engine.render && engine.render.canvas) {
mouse = Mouse.create(engine.render.canvas);
} else {
mouse = Mouse.create();
Common.log('MouseConstraint.create: options.mouse was undefined, engine.render.canvas was undefined, may not function as expected', 'warn');
}

should be

if (!mouse && engine && engine.render && engine.render.canvas) {
mouse = Mouse.create(engine.render.canvas);
} else if(!mouse) {
mouse = Mouse.create();
Common.log('MouseConstraint.create: options.mouse was undefined, engine.render.canvas was undefined, may not function as expected', 'warn');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants