Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Svg 在Draw2d touch中填充路径节点_Svg_Raphael_Draw2d Js - Fatal编程技术网

Svg 在Draw2d touch中填充路径节点

Svg 在Draw2d touch中填充路径节点,svg,raphael,draw2d-js,Svg,Raphael,Draw2d Js,我试着做一个箭头连接一个矩形和一个路径(三角形)。这是我的代码: var svgCarga = [ '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">', '<rect opacity="0" height="50" width="50" y="0" x="0" stroke-width="0" stroke="#000" fill="#fff"/>', '<rect stroke="#000"

我试着做一个箭头连接一个矩形和一个路径(三角形)。这是我的代码:

var svgCarga = [
  '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',
  '<rect opacity="0" height="50" width="50" y="0" x="0" stroke-width="0" stroke="#000" fill="#fff"/>',
  '<rect stroke="#000" height="29.875" width="4" y="6.3125" x="23" stroke-width="0" fill="#000000"/>',
  '<path fill="#000000" stroke="#000" d="m17.41375,36.090939l7.4375,10l7.4375,-10l-14.875,0z" stroke-width="1"/>',
  '</svg>',
].join();


Carga = draw2d.SVGFigure.extend({
  NAME: 'Carga',
  init: function() {
    this._super();
    this.width = 65;
    this.height = 65;
  },
  getSVG: function() {
    return svgCarga;
  }
});
var svgCarga=[
'',
'',
'',
'',
'',
].join();
Carga=draw2d.SVGFigure.extend({
姓名:'卡加',
init:function(){
这个;
这个宽度=65;
这个高度=65;
},
getSVG:function(){
返回svgCarga;
}
});
如您所见,路径有一个属性:fill=“#000000”,但呈现时显示fill=“无”。。。如果手动更改此属性,则显示填充的路径


我不知道你到底想做什么

我认为目前无法在Draw2D中填充SVG路径(请记住,SVGFigure导入目前非常有限)

'<path fill="#000000" stroke="#000" d="m17.41375,36.090939l7.4375,10l7.4375,-10l-14.875,0z" stroke-width="1"/>'
'<polygon points="25,45 15,35 35,35" fill="#000000" stroke="#000" stroke-width="1" />'
http://draw2d.org/draw2d_touch/jsdoc_5/#!/guide/extending_svg_figure