Skip to content

the calculation of “iMouse.y” is wrong #44

@ZhiWang0413

Description

@ZhiWang0413

I find that the y component of property "iMouse" is wrong.

In the callback function of “mouseMove” and "mouseDown", the code is

# mouseMove
var mouseY = _this.canvasPosition.height - clientY - _this.canvasPosition.top - window.pageYOffset;
# mouseDown
var mouseY = _this.canvasPosition.height - clientY - _this.canvasPosition.top;

it should be

# mouseMove
var mouseY = _this.canvasPosition.height - clientY + _this.canvasPosition.top - window.pageYOffset;
# mouseDown
var mouseY = _this.canvasPosition.height - clientY + _this.canvasPosition.top;

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