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

resize #10

Open
returnworld opened this issue Feb 1, 2024 · 0 comments
Open

resize #10

returnworld opened this issue Feb 1, 2024 · 0 comments

Comments

@returnworld
Copy link

Hello, I'm going through your guide(https://www.pixijselementals.com/#letterbox-scale) and getting an error

TS2339: Property 'marginBottom' does not exist on type 'ICanvasStyle'.

    Manager.app.view.style.width = `${enlargedWidth}px`;
    Manager.app.view.style.height = `${enlargedHeight}px`;
    Manager.app.view.style.marginLeft = Manager.app.view.style.marginRight = `${horizontalMargin}px`;
    Manager.app.view.style.marginTop = Manager.app.view.style.marginBottom = `${verticalMargin}px`;

view and Manager.app was initialized

        Manager.app = new Application({
        view: document.getElementById("pixi-canvas") as HTMLCanvasElement,
        resolution: window.devicePixelRatio || 1,
        autoDensity: true,
        backgroundColor: background,
        width: width,
        height: height
        });

I think this may be a webpack configuration error, but I did everything clearly consistently and not change anything in the project settings, perhaps this is due to some updates? Why styles don't work?

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