Skip to content

resize #10

Description

@returnworld

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?

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