Merge pull request #5104 from AndrewMeadows/americium

fix bug where grab.js moves mouse to upper left corner after pressing CTRL
This commit is contained in:
Brad Hefta-Gaub 2015-06-11 08:58:56 -07:00
commit 2e746324d7
2 changed files with 5 additions and 1 deletions

View file

@ -140,6 +140,10 @@ function mouseIntersectionWithPlane(pointOnPlane, planeNormal, event) {
} }
function computeNewGrabPlane() { function computeNewGrabPlane() {
if (!gIsGrabbing) {
return;
}
var maybeResetMousePosition = false; var maybeResetMousePosition = false;
if (gGrabMode !== "rotate") { if (gGrabMode !== "rotate") {
gMouseAtRotateStart = gMouseCursorLocation; gMouseAtRotateStart = gMouseCursorLocation;

View file

@ -245,7 +245,7 @@ public:
void update(const UpdateFunctorPointer& updateFunctor) { _payload->update(updateFunctor); } void update(const UpdateFunctorPointer& updateFunctor) { _payload->update(updateFunctor); }
// Shape Type Interface // Shape Type Interface
const model::MaterialKey& getMaterialKey() const { return _payload->getMaterialKey(); } const model::MaterialKey getMaterialKey() const { return _payload->getMaterialKey(); }
protected: protected:
PayloadPointer _payload; PayloadPointer _payload;