-
Notifications
You must be signed in to change notification settings - Fork 88
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
non-working boundaries after 2.10.0
update
#102
Comments
Found the bug:In the constructor of // src/fireworks.ts
this.updateOptions(options)
this.createCanvas(this.target) // <- overrides the boundaries with the current screen size This commit changed the ordering: Pushed a PR to fix this ordering bug: #103 |
Related issue?When // src/fireworks.ts
updateSize({ // <- this is the function that the Resize class executes
width = this.container.clientWidth,
height = this.container.clientHeight
}: Partial<Sizes> = {}): void {
// ...
this.updateBoundaries({
...this.opts.boundaries,
width, // bye, custom boundaries...
height
})
} The snippet of the source code above makes it impossible to use "custom" boundaries when Somehing similar to this could "fix" this?
Or just don't ever override custom set boundaries. Do you think, that this is a good idea? |
Description
I came across one example in #90 that allowed to limit the boundaries of explosions.
I wanted to reproduce this "feature" in my project and it didn't seem to work. I then noticed that the working example uses version
2.9.0
and my non-working project was using the newest2.10.2
version.Then I figured out that some changes made in the
2.10.0
version broke the boundaries setting.Working boundaries (
2.9.0
): https://codesandbox.io/s/fireworks-js-launch-2-9-0-5k1ypf?file=/src/index.tsNon-working boundaries (
2.10.0
): https://codesandbox.io/s/fireworks-js-launch-2-10-0-zyxj43?file=/src/index.tsThe only difference in the above examples is the package version of fireworks-js in
package.json
.Which package are you using?
fireworks-js
fireworks-js version
2.10.0
Browser
any
The text was updated successfully, but these errors were encountered: