这是indexloc提供的服务,不要输入任何密码
Skip to content

OrbitControls: Middle mouse button triggers case 2 instead of case 1 #104

@symbal-zhu

Description

@symbal-zhu

Hi @Knightro63

I found a possible bug in OrbitControls.

In the onMouseDown method:

void onMouseDown(event) {
  dynamic mouseAction;

  switch (event.button) {
    case 0:
      mouseAction = scope.mouseButtons['left'];
      break;
    case 1:
      mouseAction = scope.mouseButtons['MIDDLE'];
      break;
    case 2:
      mouseAction = scope.mouseButtons['right'];
      break;
    default:
      mouseAction = -1;
  }
...

Observed behavior:
When I press the middle mouse button (scroll wheel), it still goes to case 2 (right-button) instead of case 1.

Thanks for checking!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions