0

is it possible that with Konva drawed figures, dynamically scale depending of the device/resolution the user use?

So, like a responsive design?

Thanks

1 Answers1

2

Take a look at this example made with KineticJS and try to adapt it according to your needs. The trick is in setting a fixed size for the stage at the begining and then adapt it's size and scale accordingly to the width/height of the stage's container.

You will also have to update some naming conventions that might have changed in the transition between KineticJS and Konva.js.

pgrodrigues
  • 2,083
  • 1
  • 24
  • 28