Skip to content

wrong position in ie7 when rotate image #612

Closed
@lloydzhou

Description

@lloydzhou

I have run this code in ie 7, the get wrong position, but running ok in other browser.

var degree1 = 0.001;
var src1 = document.getElementById("handle").src;
var R = Raphael("holder", 590, 550),
handle = R.image(src1, 70, 36, 408, 408);
handle.transform('r' + degree1);

I think this is a floating-point overflow problem, so I suggest to be changed the code

return rad \* 180 / PI% 360; --> return Math.round ((rad \* 180 / PI% 360)\* 1000) / 1000;

in file raphael.js line 517.
and the line 513, 506 should be be the same.

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