Skip to content

Commit

Permalink
Refactor CanvasManager initialization to use options object for width…
Browse files Browse the repository at this point in the history
… and height
  • Loading branch information
BlackRam-oss committed Feb 26, 2025
1 parent 377b708 commit fd6bff0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ if (!body) {
throw new Error('body element not found')
}

canvas.initialize(body, 1920, 1080, {
canvas.initialize(body, {
height: 1080,
width: 1920,
backgroundColor: "#303030"
})

Expand Down
2 changes: 1 addition & 1 deletion src/managers/CanvasManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class CanvasManager {
* if (!body) {
* throw new Error('body element not found')
* }
* await canvas.initialize(body, 1920, 1080, {
* await canvas.initialize(body, {
* width: 1920,
* height: 1080,
* backgroundColor: "#303030"
Expand Down

0 comments on commit fd6bff0

Please sign in to comment.