gooflow 在ie8中报错line.points undefined

lxig20077 lxig20077 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

line = document.createElement("v:polyline");
if (id != "") line.id = id;
//line.style.position="absolute";
line.points.value = sp[0] + "," + sp[1] + " " + ep[0] + "," + ep[1];
line.setAttribute("fromTo", sp[0] + "," + sp[1] + "," + ep[0] + "," + ep[1]);
line.strokeWeight = "1.2";
line.stroke.EndArrow = "Block";
line.style.cursor = "crosshair";
if (id != "" && id != "GooFlow_tmp_line") {
var text = document.createElement("div");
//text.innerHTML=id;
line.appendChild(text);
var x = (ep[0] - sp[0]) / 2;
var y = (ep[1] - sp[1]) / 2;
if (x < 0) x = x * -1;
if (y < 0) y = y * -1;
text.style.left = x + "px";
text.style.top = y - 6 + "px";
line.style.cursor = "pointer";
}
if (dash) line.stroke.dashstyle = "Dash";
//if (mark) line.strokeColor = "#ff3300";
//else line.strokeColor = "#5068AE";
if (mark) line.strokeColor = "#ff3300";
else line.strokeColor = "#000000";
return line;

这一行
line.points.value = sp[0] + "," + sp[1] + " " + ep[0] + "," + ep[1];
0x800a138f - JavaScript 运行时错误: 无法设置未定义或 null 引用的属性“value”

ie9及以上,chrome 都没没问题
...全文

相关推荐

评论 12
收藏 已收藏
分享
返回顶部
lxig20077
JavaScript 87,983 成员 224,681 内容