Skip to content

Rotate stop working #9

@fedebotto

Description

@fedebotto

Hi Dirk, i was testing the traqball, and for some reason, the box with no JS error, stops rotating. This error it is fired at a random moment, sometimes at the number 10 (drag or click) and sometimes at number 400.

What i have detected is that the startMatrix variable in the rotate event returns Nan for the first 14 positions.

My "solution", is for now, at the event rotate, if the startMatrix has Nan, calculate it again.
This line is added before the THIS.box.style[cssPref+"Transform"]......

if (isNaN(startMatrix[0]) || isNaN(startMatrix[1]) || isNaN(startMatrix[2]) || .....) {
startMatrix = calcMatrix(axis, angle);
}

This solves the rotation but, the box jumps to that position.
I'm pasting a console screenshot that may help you.

Let me know if i can help you.

screen shot 2014-09-17 at 16 05 56

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