This commit is contained in:
Donal 2020-09-22 11:34:11 +08:00
parent 03d99e3c43
commit 51a1bae945
3 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,10 @@ parseOfdDocument({
success(res) {
//输出ofd每页的div
const divs = renderOfd(screenWidth, res);
//获取签章div的信息, 具体看demo
for(let ele of document.getElementsByName('seal_img_div')) {
this.addEventOnSealDiv(ele, JSON.parse(ele.dataset.sesSignature), JSON.parse(ele.dataset.signedInfo));
}
},
fail(error) {
console.log(error)

View File

@ -1,6 +1,6 @@
{
"name": "ofd.js",
"version": "0.1.1",
"version": "0.1.2",
"main": "lib/ofd.umd.min.js",
"author": "dltech21",
"description": "ofd渲染",

View File

@ -164,7 +164,6 @@ const renderSealPage = function (pageDiv, pages, tpls, isStampAnnot, stampAnnot,
div.setAttribute('style', `cursor: pointer; position:relative; left: ${divBoundary.x}px; top: ${divBoundary.y}px; width: ${divBoundary.w}px; height: ${divBoundary.h}px`)
div.setAttribute('data-ses-signature', `${JSON.stringify(SES_Signature)}`);
div.setAttribute('data-signed-info', `${JSON.stringify(signedInfo)}`);
// addEventOnSealDiv(div, SES_Signature, signedInfo);
const template = page[pageId]['json']['ofd:Template'];
if (template) {
const layer = tpls[template['@_TemplateID']]['json']['ofd:Content']['ofd:Layer'];