Canvas with Konvajs : Resize outside the canvas for perspective

245 Views Asked by At

How can i do to expand the canvas like does Konvajs ? For example I have follow this example and adapt it : https://jsfiddle.net/jurnet/3wjcfgub/

I want to drag the anchor everywhere but i'm limited with the canvas size : 300x300 I can't put the stageWidth = window.innerWidth because I have other element and I want to drag and drop every as single one :

var stageWidth = 300;
var stageHeight = 300;
var stage = new Konva.Stage({
  container: 'container',
  width: stageWidth,
  height: stageHeight
});

enter image description here For this example ; I want to place the plate and resize but as you can see it's impossible except if maybe I put the plate in the middle. But for this I have to calculate.

Thanksenter image description here

0

There are 0 best solutions below