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 Aug 19, 2024
1 parent 3918a44 commit 61330f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 81 deletions.
101 changes: 21 additions & 80 deletions app-latest-build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2172,10 +2172,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ initializeLabelEditingProvider: () => (/* binding */ initializeLabelEditingProvider),
/* harmony export */ toggleStashUse: () => (/* binding */ toggleStashUse)
/* harmony export */ });
/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 81410);
/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 81410);
/* harmony import */ var _dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsLabelUtil */ 5513);
/* harmony import */ var bpmn_js_lib_features_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/util/ModelingUtil */ 4525);
/* harmony import */ var bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! bpmn-js/lib/util/LabelUtil */ 81454);
/* harmony import */ var src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/domain/entities/elementTypes */ 73190);
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ 44741);

Expand All @@ -2184,8 +2182,6 @@ __webpack_require__.r(__webpack_exports__);





let dictionaryService;
let numberStash = 0;
let stashUse = false;
Expand Down Expand Up @@ -2262,7 +2258,7 @@ function DSLabelEditingProvider(eventBus, canvas, directEditing, modeling, resiz
activateDirectEdit(event.shape);
});
function activateDirectEdit(element, force) {
if (force || (0,bpmn_js_lib_features_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, [src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.TEXTANNOTATION]) || element.businessObject.type.includes(src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.DOMAINSTORY)) {
if (force || element.businessObject.type.includes(src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.DOMAINSTORY)) {
directEditing.activate(element);
}
}
Expand Down Expand Up @@ -2294,22 +2290,15 @@ DSLabelEditingProvider.prototype.activate = function (element) {
};
// bounds
let bounds = this.getEditingBBox(element);
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(context, bounds);
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(context, bounds);
let options = {};
// external labels
if ((0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabelExternal)(element)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(options, {
autoResize: true
});
}
// text annotations
if (element.businessObject.type.includes(src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.TEXTANNOTATION)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(options, {
if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.TEXTANNOTATION)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(options, {
resizable: true,
autoResize: true
});
}
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(context, {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(context, {
options: options
});
return context;
Expand All @@ -2326,39 +2315,32 @@ DSLabelEditingProvider.prototype.getEditingBBox = function (element) {
let canvas = this._canvas;
let target = element.label || element;
let bbox = canvas.getAbsoluteBBox(target);
let mid = {
x: bbox.x + bbox.width / 2,
y: bbox.y + bbox.height / 2
};
// default position
let bounds = {
x: bbox.x,
y: bbox.y
};
/** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated,
* because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/
/** The canvas is an object from bpmn-js. The IDE might say that zoom is deprecated,
* because it thinks that canvas is the standard HTML element.**/
let zoom = canvas.zoom();
let defaultStyle = this._textRenderer.getDefaultStyle(),
externalStyle = this._textRenderer.getExternalStyle();
let defaultStyle = this._textRenderer.getDefaultStyle();
// take zoom into account
let externalFontSize = externalStyle.fontSize * zoom,
externalLineHeight = externalStyle.lineHeight,
defaultFontSize = defaultStyle.fontSize * zoom,
let defaultFontSize = defaultStyle.fontSize * zoom,
defaultLineHeight = defaultStyle.lineHeight;
let style = {
fontFamily: this._textRenderer.getDefaultStyle().fontFamily,
fontWeight: this._textRenderer.getDefaultStyle().fontWeight
};
// adjust for groups
if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.GROUP)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(bounds, {
minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,
maxWidth: bbox.width,
minHeight: 30 * zoom,
x: bbox.x,
y: bbox.y
});
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(style, {
fontSize: defaultFontSize + "px",
lineHeight: defaultLineHeight,
paddingTop: 7 * zoom + "px",
Expand All @@ -2368,16 +2350,16 @@ DSLabelEditingProvider.prototype.getEditingBBox = function (element) {
textAlign: "left"
});
}
// internal labels for tasks and collapsed call activities,
// sub processes and participants
if (/^domainStory:actor\w*/.test(element.type) || /^domainStory:workObject\w*/.test(element.type)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, {
if (
// we can't use util's is() function here because the type contains the name of the icon
/^domainStory:actor\w*/.test(element.type) || /^domainStory:workObject\w*/.test(element.type)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(bounds, {
width: bbox.width,
minHeight: 30,
y: bbox.y + bbox.height - 20,
x: bbox.x
});
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(style, {
fontSize: defaultFontSize + "px",
lineHeight: defaultLineHeight,
paddingTop: 7 * zoom + "px",
Expand All @@ -2386,56 +2368,15 @@ DSLabelEditingProvider.prototype.getEditingBBox = function (element) {
paddingRight: 5 * zoom + "px"
});
}
let width = 90 * zoom,
paddingTop = 7 * zoom,
paddingBottom = 4 * zoom;
// external labels for events, data elements, gateways and connections
if (target.labelTarget) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, {
width: width,
height: bbox.height + paddingTop + paddingBottom,
x: mid.x - width / 2,
y: bbox.y - paddingTop
});
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, {
fontSize: externalFontSize + "px",
lineHeight: externalLineHeight,
paddingTop: paddingTop + "px",
paddingBottom: paddingBottom + "px"
});
}
// external label not yet created
if ((0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabelExternal)(target) && !(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.hasExternalLabel)(target) && !(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabel)(target)) {
let externalLabelMid = (0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getExternalLabelMid)(element);
let absoluteBBox = canvas.getAbsoluteBBox({
x: externalLabelMid.x,
y: externalLabelMid.y,
width: 0,
height: 0
});
let height = externalFontSize + paddingTop + paddingBottom;
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, {
width: width,
height: height,
x: absoluteBBox.x - width / 2,
y: absoluteBBox.y - height / 2
});
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, {
fontSize: externalFontSize + "px",
lineHeight: externalLineHeight,
paddingTop: paddingTop + "px",
paddingBottom: paddingBottom + "px"
});
}
// text annotations
if (element.businessObject.type.includes(src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.TEXTANNOTATION)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, {
if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, src_app_domain_entities_elementTypes__WEBPACK_IMPORTED_MODULE_1__.ElementTypes.TEXTANNOTATION)) {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(bounds, {
width: bbox.width,
height: bbox.height,
minWidth: 30 * zoom,
minHeight: 10 * zoom
});
(0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, {
(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(style, {
textAlign: "left",
paddingTop: 7 * zoom + "px",
paddingBottom: 7 * zoom + "px",
Expand Down Expand Up @@ -3761,7 +3702,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ reworkGroupElements: () => (/* binding */ reworkGroupElements),
/* harmony export */ undoGroupRework: () => (/* binding */ undoGroupRework)
/* harmony export */ });

// TODO: this will not work for actors and work objects as the name of the icon is part of the type
function is(element, type) {
const bo = getBusinessObject(element);
return bo && bo.type === 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 61330f0

Please sign in to comment.