Skip to content

Commit

Permalink
Deploy latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
egon-development committed May 11, 2024
1 parent 50f5669 commit fd93c4a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
27 changes: 16 additions & 11 deletions app-latest-build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,23 @@ function DomainStoryRenderer(eventBus, styles, canvas, textRenderer, pathMap, co
if (numberStash.use) {
semantic.number = numberStash.number;
}
// !IMPORTANT!
// When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number.
// To circumvent this, we draw a . as the white background and an o as the circle around the number.
// There is a minor Bug, that in some Programs the used Font is not supported, which defaults to Arial, where the o is not round but oval.
// Unit 3rd Party Tools update their svg-version to 1.2 we should keep this workaround.
box.x -= 65;
box.y -= 12;
renderNumber(parentGfx, ".", backgroundDotStyle(box), element.type);
box.x += 30;
box.y += 3;
renderNumber(parentGfx, "o", backgroundBoxStyle(box), element.type);
numbers[semantic.number] = true;
box.x += 9;
box.y -= 7;
if (semantic.number < 10) {
box.x += 3;
}
let newRenderedNumber = renderNumber(parentGfx, semantic.number, numberStyle(box), element.type);
(0,_numbering_numbering__WEBPACK_IMPORTED_MODULE_4__.addNumberToRegistry)(newRenderedNumber, semantic.number);
}
Expand Down Expand Up @@ -1012,19 +1028,8 @@ function DomainStoryRenderer(eventBus, styles, canvas, textRenderer, pathMap, co
(0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.classes)(text).add("djs-labelNumber");
setCoordinates(type, text, options, height, parentGfx);
(0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parentGfx, text);
drawCircle(parentGfx, options, number.length);
return text;
}
function drawCircle(parentGfx, options, textLength) {
const circle = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)("circle");
(0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(circle, {
cx: options.box.x + 15 + textLength * 3,
cy: options.box.y - 4,
r: "10",
style: "fill:transparent;stroke:black;stroke-width:1"
});
(0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parentGfx, circle);
}
// the coordinates of the activity label must be set directly and will not be taken from the box
function setCoordinates(type, text, options, height, parentGfx) {
if (/:activity$/.test(type)) {
Expand Down
2 changes: 1 addition & 1 deletion app-latest-build/main.js.map

Large diffs are not rendered by default.

0 comments on commit fd93c4a

Please sign in to comment.