Skip to content

about canvas rotation and use scroller Dimensions wrong #76

@gto999

Description

@gto999

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);

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