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

Scale set in DiceBox config overwritten by BoxControls #5

Open
wcroteau opened this issue Nov 9, 2022 · 1 comment · May be fixed by #6
Open

Scale set in DiceBox config overwritten by BoxControls #5

wcroteau opened this issue Nov 9, 2022 · 1 comment · May be fixed by #6

Comments

@wcroteau
Copy link

wcroteau commented Nov 9, 2022

Setting the scale in DiceBox configuration has no effect...

To replicate this issue, just use the kitchen sink demo you published to CodeSandbox, change the scale to something other than the default (e.g. 9) like so:

let Box = new DiceBox("#dice-box", {
  assetPath: "/public/assets/dice-box/",
  theme: "default",
  offscreen: true,
  scale: 9
});

Notice that the scale is NOT applied and there's no visual difference from the default of 6.

IF however you change the scale via the Box Controls to a value of 9 then you can clearly see the size difference.

It would appear therefore that the scale config parameter is ignored.

@wcroteau
Copy link
Author

wcroteau commented Nov 9, 2022

I have discovered that this is due to the BoxControl not respecting the config passed in respecting scale instead it always default. A pull request to fix this to follow shortly...

@wcroteau wcroteau linked a pull request Nov 10, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant