Make it possible to use the focus-right-click-drag-camera in the edit.js script again. Still keep right-clicking ignore Toolbar and entity selection events.

This commit is contained in:
Thijs Wenker 2015-12-07 13:49:49 +01:00
parent 712048ce51
commit 22bdc1ae84
2 changed files with 10 additions and 4 deletions

View file

@ -392,6 +392,11 @@ var toolBar = (function() {
url,
file;
if (!event.isLeftButton) {
// if another mouse button than left is pressed ignore it
return false;
}
clickedOverlay = Overlays.getOverlayAtPoint({
x: event.x,
y: event.y
@ -738,10 +743,6 @@ var mousePressStartPosition = {
var mouseDown = false;
function mousePressEvent(event) {
if (!event.isLeftButton) {
// If another mouse button than left is pressed ignore it
return false;
}
mouseDown = true;
mousePressStartPosition = {
x: event.x,

View file

@ -2340,6 +2340,11 @@ SelectionDisplay = (function () {
that.mousePressEvent = function(event) {
if (!event.isLeftButton) {
// if another mouse button than left is pressed ignore it
return false;
}
var somethingClicked = false;
var pickRay = Camera.computePickRay(event.x, event.y);