我需要加载个性化的对象iText的,从JSON加载,但面料返回一个错误:错误使用JSON,面料和iText的
fabric.min.js:1 Uncaught TypeError: Cannot read property 'async' of undefined(anonymous function) @ fabric.min.js:1enlivenObjects @ fabric.min.js:1_enlivenObjects @ fabric.min.js:4loadFromJSON @ fabric.min.js:4success @ code.js:5067c @ jquery.min.js:2fireWith @ jquery.min.js:2k @ jquery.min.js:4r @ jquery.min.js:4
我需要加载该JSON
{
"type": "itext",
"originX": "left",
"originY": "top",
"lockMovementX": false,
"lockMovementY": false,
"lockScalingX": false,
"lockScalingY": false,
"lockRotation": false,
"lockUniScaling": false,
"lockScalingFlip": false,
"borderColor": "rgba(102,153,255,0.75)",
"cornerColor": "rgba(102,153,255,0.5)",
"transparentCorners": true,
"padding": 0,
"hasBorders": true,
"hasControls": true,
"cornerSize": 12,
"id": 5,
"nombre": "Objeto_5",
"lnk": "http://www.google.com",
"left": 200,
"top": 190,
"width": 334.34,
"height": 52.43,
"fill": "rgb(0,0,0)",
"stroke": null,
"strokeWidth": 1,
"strokeDashArray": null,
"strokeLineCap": "butt",
"strokeLineJoin": "miter",
"strokeMiterLimit": 10,
"scaleX": 1,
"scaleY": 1,
"angle": 0,
"flipX": false,
"flipY": false,
"opacity": 1,
"shadow": null,
"visible": true,
"clipTo": null,
"backgroundColor": "",
"fillRule": "nonzero",
"globalCompositeOperation": "source-over",
"transformMatrix": null,
"text": "Click to change Text",
"fontSize": 40,
"fontWeight": "normal",
"fontFamily": "Times New Roman",
"fontStyle": "",
"lineHeight": 1.16,
"textDecoration": "",
"textAlign": "left",
"textBackgroundColor": "",
"styles": {}
}
我想我的问题是在属性lnk,它包含一种链接。
这个个性化对象的原因是,当我双击对象时,应该在浏览器中打开网页。
这个问题只有我有它在iText的对象类型
抱歉,JSF:https://jsfiddle.net/samael205/ffsz1e8o/ –