fillout-image-form
v0.0.2
Published
Fill out image form automatically for frontend based on BOM.
Downloads
8
Maintainers
Readme
FRONTEND USING ONLY
- Fill out image form automatically for frontend based on BOM.
USAGE
- HTML
<input id="imageId" type="file" accept="image/*" />
<button id="button" type="button">printout</button>
<canvas id="canvasId" width="5000" height="5000"></canvas>
- JavaScript
//Function
//1.加载imageId所选图片到canvasId所在的标签中
//2.在canvas中单击鼠标,其位置会记录到position属性中
loadImg2Canvas("canvasId","imageId")
//点击triggerId所在标签会将字符串型数组(contentList)依次填入到包含位置信息的对象型数组(positionList)中
printout("triggerId",positionList,contentList)
//Attribute
position:[{x:x1,y:y1},{x:x2,y:y2}]