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 Jan 3, 2025
1 parent c9de0c9 commit 5232bc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions app-latest-build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ function createTitleAndDescriptionSVGElement(initDynamicHeightOffset, title, des
dynamicHeightOffset = initDynamicHeightOffset;
title = title.replace("<", "").replace(">", "");
let titleElement = createTitle(title, width);
let descriptionElement = createDescription(description, width);
let descriptionElement = "";
if (description) {
descriptionElement = createDescription(description, width);
}
// to display the title and description in the SVG-file, we need to add a container for our text-elements
let insertText = '<g class="djs-group"><g class="djs-element djs-shape" style = "display:block" transform="translate(' + (min_x - 10) + " " + (min_y - dynamicHeightOffset) + ')"><g class="djs-visual">' + titleElement + descriptionElement + "</g></g></g>";
return {
Expand Down Expand Up @@ -6192,7 +6195,7 @@ class PngService {
}
return svg;
}
findMostOuterElements(svg) {
findMostOuterElements(svg, includeSpaceForDescription) {
let xLeft = 0;
let xRight = 0;
let yUp = 0;
Expand Down Expand Up @@ -6252,7 +6255,10 @@ class PngService {
yDown = elYDown;
}
}
yUp -= 75; // we need to adjust yUp to have space for the title and description
// we need to adjust yUp to have space for the description if necessary
if (includeSpaceForDescription) {
yUp -= 75;
}
return {
xLeft,
xRight,
Expand All @@ -6261,7 +6267,7 @@ class PngService {
};
}
prepareSVG(svg, layerBase, description, title, withTitle) {
const box = this.findMostOuterElements(layerBase);
const box = this.findMostOuterElements(layerBase, description === undefined);
let viewBoxIndex = svg.indexOf('width="');
this.calculateWidthAndHeight(box);
const {
Expand All @@ -6271,7 +6277,7 @@ class PngService {
if (withTitle) {
this.height += dynamicHeightOffset;
}
const bounds = this.createBounds(box, dynamicHeightOffset);
const bounds = this.createBounds(box, withTitle ? dynamicHeightOffset : 0);
const dataStart = svg.substring(0, viewBoxIndex);
viewBoxIndex = svg.indexOf('style="');
const dataEnd = svg.substring(viewBoxIndex);
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 5232bc5

Please sign in to comment.