@contrail/documents 1.3.15 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,6 +87,7 @@ class DocumentElementPropertyBindingHandler {
|
|
|
87
87
|
return (contentType === null || contentType === void 0 ? void 0 : contentType.indexOf('image')) > -1 && (contentType === null || contentType === void 0 ? void 0 : contentType.toLowerCase().indexOf('tiff')) < 0;
|
|
88
88
|
}
|
|
89
89
|
static adjustPropertyElements(element, elements, model) {
|
|
90
|
+
var _a;
|
|
90
91
|
if (color_component_service_1.ColorComponentService.isColorComponent(element) && (elements === null || elements === void 0 ? void 0 : elements.length) > 0 && (model === null || model === void 0 ? void 0 : model.color)) {
|
|
91
92
|
const colorRect = color_component_service_1.ColorComponentService.getColorRectangle(elements);
|
|
92
93
|
if (colorRect) {
|
|
@@ -97,7 +98,7 @@ class DocumentElementPropertyBindingHandler {
|
|
|
97
98
|
colorRect.style = { background: { size: common_1.BackgroundSizeType.CONTAIN } };
|
|
98
99
|
colorRect.propertyBindings = { url: 'viewable.mediumViewableDownloadUrl' };
|
|
99
100
|
}
|
|
100
|
-
else if (!model.color.primaryViewableId && colorRect.type === 'image') {
|
|
101
|
+
else if (!model.color.primaryViewableId && colorRect.type === 'image' && ((_a = model === null || model === void 0 ? void 0 : model.color) === null || _a === void 0 ? void 0 : _a.hexCode)) {
|
|
101
102
|
colorRect.type = 'rectangle';
|
|
102
103
|
colorRect.size.height = colorRect.size.width;
|
|
103
104
|
colorRect.style = {
|
|
@@ -6,11 +6,11 @@ const document_element_factory_1 = require("./document-element-factory");
|
|
|
6
6
|
class DocumentFrameService {
|
|
7
7
|
static generateFrames(document, documentFrameGenerationOptions = {}) {
|
|
8
8
|
var _a, _b, _c, _d, _e, _f;
|
|
9
|
-
const options = Object.assign(
|
|
9
|
+
const options = Object.assign({
|
|
10
10
|
includeHidden: true,
|
|
11
11
|
selectedIds: [],
|
|
12
12
|
relativePosition: false,
|
|
13
|
-
});
|
|
13
|
+
}, documentFrameGenerationOptions);
|
|
14
14
|
const includeSelected = ((_a = options.selectedIds) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
15
15
|
const frames = new Map();
|
|
16
16
|
const elementsMap = new Map((_b = document === null || document === void 0 ? void 0 : document.elements) === null || _b === void 0 ? void 0 : _b.map((element) => [element.id, element]));
|