mxgraph:Drawio 使用参数说明(备忘)

mxGraph:Drawio 使用参数

mxGraph,是一个工具库,提供交互式图表、图形绘制应用。

源代码:
mxGraph : https://github.com/jgraph/mxgraph/tree/v4.0.3
Drawio : https://github.com/jgraph/drawio

应用语言

javascript

属性 参数说明

一、 基本图形
图形shape
square矩形
squareCircle圆角矩形
round圆形
ellipse椭圆形
line直线
二、复合图形
		this.addEntry('price', function()
		{
		    var cell = new mxCell('', new mxGeometry(1, 0, 60, 30), 'shape=price;type=int;html=1;strokeColor=none;fillColor=#000000;fontColor=#ffffff;fontSize=30;align=center;verticalAlign=middle;whiteSpace=nowrap;rounded=0;fontFamily=dzzt');
		    cell.vertex = true;
		    cell.value = "99."
		    
			var symbol = new mxCell('', new mxGeometry(1, 0, 30, 30), 'shape=price;type=dec;html=1;strokeColor=none;fillColor=#000000;fontColor=#ffffff;fontSize=12;align=center;verticalAlign=middle;whiteSpace=nowrap;rounded=0;fontFamily=dzzt');
			symbol.vertex = true;
			symbol.geometry.relative = true;
			symbol.geometry.offset = new mxPoint(5, 0);
		    symbol.value = "50"
			cell.insert(symbol);
	    	return sidebar.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'price');
		}),
	];
三、图形属性
属性名归属模块参数说明
editablegraph[STYLE_EDITABLE]图形内编辑文本[true/false]
hide labelformat[STYLE_NOLABEL]不显示图形文本[true/false]
deletableformat[STYLE_DELETABLE]删除图形属性[true/false]
rotatableformat[STYLE_ROTATABLE]图形旋转属性[true/false]
resizableformat[STYLE_RESIZABLE]变更图形大小[true/false]
connectablegraph[graph.setConnectable]自动连接line[true/false]
bendablemxGraph.prototype.cellsBendableline中点拖动[true/false]
lockedmxGraph.prototype.cellsLocked图形锁定[true/false]
四、网页CSS参数
参数名归属模块变量类型说明
headerHeightEditorUi.prototype.headerHeightintheader 的高度
toolbarHeighEditorUi.prototype.toolbarHeightint工具栏高度
formatWidthEditorUi.prototype.formatWidthintformat/样式栏宽度
footerHeightEditorUi.prototype.footerHeightintfooter的高度
hsplitPositionEditorUi.prototype.hsplitPositionintsidebar的宽度
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值