feat: change default black to off black
Related to https://github.com/bpmn-io/diagram-js/issues/571
This commit is contained in:
parent
9bcfea9c8b
commit
6fe5b48225
|
@ -14,6 +14,8 @@ import {
|
||||||
// re-export getDi for compatibility
|
// re-export getDi for compatibility
|
||||||
export { getDi };
|
export { getDi };
|
||||||
|
|
||||||
|
export var black = 'hsl(225, 10%, 15%)';
|
||||||
|
|
||||||
// element utils //////////////////////
|
// element utils //////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +66,7 @@ export function getFillColor(element, defaultColor) {
|
||||||
export function getStrokeColor(element, defaultColor) {
|
export function getStrokeColor(element, defaultColor) {
|
||||||
var di = getDi(element);
|
var di = getDi(element);
|
||||||
|
|
||||||
return di.get('color:border-color') || di.get('bioc:stroke') || defaultColor || 'black';
|
return di.get('color:border-color') || di.get('bioc:stroke') || defaultColor || black;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getLabelColor(element, defaultColor, defaultStrokeColor) {
|
export function getLabelColor(element, defaultColor, defaultStrokeColor) {
|
||||||
|
|
|
@ -57,6 +57,8 @@ import {
|
||||||
|
|
||||||
import Ids from 'ids';
|
import Ids from 'ids';
|
||||||
|
|
||||||
|
import { black } from './BpmnRenderUtil';
|
||||||
|
|
||||||
var RENDERER_IDS = new Ids();
|
var RENDERER_IDS = new Ids();
|
||||||
|
|
||||||
var TASK_BORDER_RADIUS = 10;
|
var TASK_BORDER_RADIUS = 10;
|
||||||
|
@ -85,7 +87,7 @@ export default function BpmnRenderer(
|
||||||
|
|
||||||
function addMarker(id, options) {
|
function addMarker(id, options) {
|
||||||
var attrs = assign({
|
var attrs = assign({
|
||||||
fill: 'black',
|
fill: black,
|
||||||
strokeWidth: 1,
|
strokeWidth: 1,
|
||||||
strokeLinecap: 'round',
|
strokeLinecap: 'round',
|
||||||
strokeDasharray: 'none'
|
strokeDasharray: 'none'
|
||||||
|
@ -264,7 +266,7 @@ export default function BpmnRenderer(
|
||||||
offset = offset || 0;
|
offset = offset || 0;
|
||||||
|
|
||||||
attrs = computeStyle(attrs, {
|
attrs = computeStyle(attrs, {
|
||||||
stroke: 'black',
|
stroke: black,
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
fill: 'white'
|
fill: 'white'
|
||||||
});
|
});
|
||||||
|
@ -299,7 +301,7 @@ export default function BpmnRenderer(
|
||||||
offset = offset || 0;
|
offset = offset || 0;
|
||||||
|
|
||||||
attrs = computeStyle(attrs, {
|
attrs = computeStyle(attrs, {
|
||||||
stroke: 'black',
|
stroke: black,
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
fill: 'white'
|
fill: 'white'
|
||||||
});
|
});
|
||||||
|
@ -332,7 +334,7 @@ export default function BpmnRenderer(
|
||||||
}).join(' ');
|
}).join(' ');
|
||||||
|
|
||||||
attrs = computeStyle(attrs, {
|
attrs = computeStyle(attrs, {
|
||||||
stroke: 'black',
|
stroke: black,
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
fill: 'white'
|
fill: 'white'
|
||||||
});
|
});
|
||||||
|
@ -350,7 +352,7 @@ export default function BpmnRenderer(
|
||||||
|
|
||||||
function drawLine(parentGfx, waypoints, attrs) {
|
function drawLine(parentGfx, waypoints, attrs) {
|
||||||
attrs = computeStyle(attrs, [ 'no-fill' ], {
|
attrs = computeStyle(attrs, [ 'no-fill' ], {
|
||||||
stroke: 'black',
|
stroke: black,
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
fill: 'none'
|
fill: 'none'
|
||||||
});
|
});
|
||||||
|
@ -366,7 +368,7 @@ export default function BpmnRenderer(
|
||||||
|
|
||||||
attrs = computeStyle(attrs, [ 'no-fill' ], {
|
attrs = computeStyle(attrs, [ 'no-fill' ], {
|
||||||
strokeWidth: 2,
|
strokeWidth: 2,
|
||||||
stroke: 'black'
|
stroke: black
|
||||||
});
|
});
|
||||||
|
|
||||||
var path = svgCreate('path');
|
var path = svgCreate('path');
|
||||||
|
@ -1471,7 +1473,7 @@ export default function BpmnRenderer(
|
||||||
|
|
||||||
if (di.messageVisibleKind === 'initiating') {
|
if (di.messageVisibleKind === 'initiating') {
|
||||||
messageAttrs.fill = 'white';
|
messageAttrs.fill = 'white';
|
||||||
messageAttrs.stroke = 'black';
|
messageAttrs.stroke = black;
|
||||||
} else {
|
} else {
|
||||||
messageAttrs.fill = '#888';
|
messageAttrs.fill = '#888';
|
||||||
messageAttrs.stroke = 'white';
|
messageAttrs.stroke = 'white';
|
||||||
|
@ -1546,7 +1548,7 @@ export default function BpmnRenderer(
|
||||||
|
|
||||||
/* output arrow path */ drawPath(parentGfx, arrowPathData, {
|
/* output arrow path */ drawPath(parentGfx, arrowPathData, {
|
||||||
strokeWidth: 1,
|
strokeWidth: 1,
|
||||||
fill: 'black'
|
fill: black
|
||||||
});
|
});
|
||||||
|
|
||||||
return elementObject;
|
return elementObject;
|
||||||
|
|
Loading…
Reference in New Issue