data-paper-resize=ā€œtrueā€

ts

window.app.paper.project.view.onResize = () => {
  window.app.paper.project.view.center = center;
}

I havenā€™t done it yet, but Iā€™ll make sure to Save previous center when moving screens. That way you can keep it centered when the canvas size changes as shown above.

Paper.js


This page is auto-translated from /nishio/React+Paper.js恧resize using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. Iā€™m very happy to spread my thought to non-Japanese readers.