标签:style http color io os ar 使用 sp 数据
一,ACTIVITI提供图像查看模块diagram-viewer,这个模块可以以REST的方式获取数据,然后显示流程进行状况,但是默认的TASK是米黄色,和很多网站色调不搭,只有通过修改来改变颜色,现在修改成白色背景,可以适应各种网站:
1,修改diagram-viewer使用的JS脚本中:ProcessDiagramCanvas.js,这个是主要的绘制脚本,设置TASK颜色的是其中一段代码
var attr = {"stroke-width": this.strokeWidth, stroke: TASK_STROKE_COLOR, fill: this.getPaint()};
找到代码地点,
修改前:
_drawTask: function(name, x, y, width, height, thickBorder) {
var originalPaint = this.getPaint();
this.setPaint(TASK_COLOR);
// anti smoothing
if (this.strokeWidth%2 == 1)
x = Math.round(x) + .5, y = Math.round(y) + .5;
// shape
var shape = this.g.rect(x, y, width, height, TASK_CORNER_ROUND);
//fill: this.getPaint()就是TASK填充色,默认是取的一个渐变色,就是黄色,可以改成任意颜色
var attr = {"stroke-width": this.strokeWidth, stroke: TASK_STROKE_COLOR, fill: this.getPaint()};
shape.attr(attr);
//shape.attr({fill: "90-"+this.getPaint()+"-" + Color.get(250, 250, 244)});
var contextObject = this.getConextObject();
if (contextObject) {
shape.id = contextObject.id;
shape.data("contextObject", contextObject);
}

修改后:
//fill: this.getPaint()就是TASK填充色,默认是取的一个渐变色,就是黄色,可以改成任意颜色,ACT所有引用的颜色都在Color.js里面, Color.Snow是白色
var attr = {"stroke-width": this.strokeWidth, stroke: TASK_STROKE_COLOR, fill: Color.Snow};

二,修改图像设计器MOLDER的颜色
研究中...
标签:style http color io os ar 使用 sp 数据
原文地址:http://my.oschina.net/acitiviti/blog/336224