flekschas/piling.js

The pile scale-up toggler doesn't factor in automatic scaling

Closed this issue · 0 comments

Commit or branch: master

Observed behavior

  • When pileScale is used (like in the matrix example), automatic scaling will make the library think a pile is scaled-up and suggest to scale down on right-click.

Expected behavior

  • When pileScale is used, the automatically set scale should act as the base scale. I.e., the automatically set scale should be regarded as the base scale.

Steps to reproduce

  1. Open the matrix example
  2. Pile up two items
  3. They will scale up to 1.05 bit (due to pileScale: pile => 1 + Math.min((pile.items.length - 1) * 0.05, 0.5))
  4. Right-click on that pile
  5. The menu will show Scale Down

Jan-25-2020 21-44-41

In the above example, after piling the two items and doing a right-click, the menu should say Scale Up. Upon clicking on Scale Up it should scale to base scale * scale-up factor.