DrSensor / vue-annotator

Vue Component for drawing annotation (rect, polygon, etc) using SVG element
http://vue-annotator.surge.sh
MIT License
79 stars 16 forks source link

Add option to set width and height fill window automatically #4

Open DrSensor opened 6 years ago

DrSensor commented 6 years ago

Add autofit props to make the canvas fill width and height.

Usage

<annotator autofit>
   <img src="big_image.png" />
</annotator>

Clue

Set width and height of $refs.bg equal to scroll{Width/Height} of $refs.svg.parentNode