Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about canvas rotation and use scroller Dimensions wrong #76

Open
gto999 opened this issue May 23, 2018 · 0 comments
Open

about canvas rotation and use scroller Dimensions wrong #76

gto999 opened this issue May 23, 2018 · 0 comments

Comments

@gto999
Copy link

gto999 commented May 23, 2018

When using the createjs framework, with the scroller to do scrolling, rotating the canvas angle, will cause the value of the maximum distance to set the scroll is wrong, there will be differences in the PC and the mobile terminal, there are differences in different mobile phones, Android IOS has a problem, specifically If CANVAS is scaled, how do you calculate the scrolling area?

// canvas.width = stageWidth; // canvas.height = stageHeight; // if (stageWidth < stageHeight) { // if(scrollDirection !== "top"){ // sceneV(); // }
    //     stageScale = stageWidth / 640;
    //     container.rotation = 90;
    //     container.x = 640 * stageScale;
    //     container.y = 0; //stageHeight / 2 - 1138 * stageScale / 2; //居中一下
    //     container.scaleX = stageScale;
    //     container.scaleY = stageScale;

    // } else {
    //     if(scrollDirection !== "left"){
    //         sceneH();
    //     }
    //     stageScale = stageHeight / 640;
    //     container.rotation = 0;
    //     container.x = 0;
    //     container.y = (stageHeight / 2 - (640 / 2) * stageScale) / 1; //居中一下//0;
    //     container.scaleX = stageScale;
    //     container.scaleY = stageScale;
    // }


  //scroller.setDimensions(app.view.width, app.view.height, app.view.height, contentLength);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant