Open rozumny opened 5 years ago
@rozumny Sorry for the late reply.
You can resolve the canvas size with the imageEditor.resizeCanvasDimension
api.
However, it is currently difficult to change controls dynamically with the includeUI option.
This issue will be considered for improvement.
I found a workaround of this problem (dom is the htmlDivElement of tui image editor, instance is the ImageEditor object) (you need change 20 or 280 with full width image and full height and guess and try):
const ro = new ResizeObserver(()=>{
const cssMaxWidth = dom.clientWidth-20
const cssMaxHeight = dom.clientHeight-280
instance.resizeCanvasDimension({width: cssMaxWidth, height: cssMaxHeight})
})
ro.observe(dom)
Hi guys, is it possible to auto resize editor (canvas, controls,...) when user resize browser window?