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

[Bug] ZUI addLimits should include translations #632

Open
1 task done
jackieveev opened this issue May 12, 2022 · 1 comment
Open
1 task done

[Bug] ZUI addLimits should include translations #632

jackieveev opened this issue May 12, 2022 · 1 comment

Comments

@jackieveev
Copy link

jackieveev commented May 12, 2022

Describe the bug
zui.addLimits(0.2, 2, 'scale') works well, but zui.addLimits(0, 1000, 'x') and zui.addLimits(0, 1000, 'y') not working as what I expected.

To Reproduce

var two = new Two({
  fullscreen: true,
  autostart: true,
  type: Two.Types.canvas
})
two.appendTo(document.body)

var zui = new Two.ZUI(stage)

Expected behavior
It should be works for the limitation of x and y when zui.translateSurface(dx, dy)

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please select one):

  • Code executes in browser (e.g: using script tag to load library)
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/two.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/extras/js/zui.js"></script>

Desktop (please complete the following information):

  • Browser [chrome]
@jackieveev jackieveev added the bug label May 12, 2022
@jonobr1
Copy link
Owner

jonobr1 commented May 16, 2022

zui.addLimit is only for scale. There aren't limits / boundaries for panning.

@jonobr1 jonobr1 added enhancement and removed bug labels May 16, 2022
@jonobr1 jonobr1 changed the title [Bug]ZUI addLimits not working [Bug]ZUI addLimits should include translations May 16, 2022
@jonobr1 jonobr1 changed the title [Bug]ZUI addLimits should include translations [Bug] ZUI addLimits should include translations May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants