@chili-publish/studio-sdk 0.123.0 → 0.133.2
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.
- package/README.md +1 -1
- package/_bundles/main.js +1 -1
- package/_bundles/main.js.map +1 -1
- package/_bundles/report.html +2 -2
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/ActionController.d.ts +33 -25
- package/lib/src/controllers/ActionController.js +42 -31
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/AnimationController.d.ts +24 -24
- package/lib/src/controllers/AnimationController.js +28 -28
- package/lib/src/controllers/AnimationController.js.map +1 -1
- package/lib/src/controllers/CanvasController.d.ts +3 -2
- package/lib/src/controllers/CanvasController.js +4 -3
- package/lib/src/controllers/CanvasController.js.map +1 -1
- package/lib/src/controllers/CharacterStyleController.d.ts +23 -23
- package/lib/src/controllers/CharacterStyleController.js +26 -26
- package/lib/src/controllers/CharacterStyleController.js.map +1 -1
- package/lib/src/controllers/ColorStyleController.d.ts +22 -22
- package/lib/src/controllers/ColorStyleController.js +27 -27
- package/lib/src/controllers/ColorStyleController.js.map +1 -1
- package/lib/src/controllers/ConfigurationController.d.ts +1 -1
- package/lib/src/controllers/ConfigurationController.js +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +21 -12
- package/lib/src/controllers/ConnectorController.js +28 -19
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/DebugController.d.ts +2 -2
- package/lib/src/controllers/DebugController.js +2 -2
- package/lib/src/controllers/DebugController.js.map +1 -1
- package/lib/src/controllers/DocumentController.d.ts +6 -6
- package/lib/src/controllers/DocumentController.js +7 -7
- package/lib/src/controllers/DocumentController.js.map +1 -1
- package/lib/src/controllers/ExperimentController.d.ts +32 -7
- package/lib/src/controllers/ExperimentController.js +42 -9
- package/lib/src/controllers/ExperimentController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +36 -28
- package/lib/src/controllers/FontConnectorController.js +45 -37
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FontController.d.ts +15 -15
- package/lib/src/controllers/FontController.js +18 -18
- package/lib/src/controllers/FontController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +127 -127
- package/lib/src/controllers/FrameController.js +173 -173
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +37 -37
- package/lib/src/controllers/LayoutController.js +48 -48
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +33 -23
- package/lib/src/controllers/MediaConnectorController.js +41 -31
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/PageController.d.ts +11 -11
- package/lib/src/controllers/PageController.js +16 -16
- package/lib/src/controllers/PageController.js.map +1 -1
- package/lib/src/controllers/ParagraphStyleController.d.ts +20 -20
- package/lib/src/controllers/ParagraphStyleController.js +23 -23
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
- package/lib/src/controllers/ShapeController.d.ts +28 -28
- package/lib/src/controllers/ShapeController.js +43 -43
- package/lib/src/controllers/ShapeController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.d.ts +18 -18
- package/lib/src/controllers/SubscriberController.js +24 -24
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/TextStyleController.d.ts +7 -7
- package/lib/src/controllers/TextStyleController.js +7 -7
- package/lib/src/controllers/TextStyleController.js.map +1 -1
- package/lib/src/controllers/ToolController.d.ts +10 -10
- package/lib/src/controllers/ToolController.js +9 -9
- package/lib/src/controllers/ToolController.js.map +1 -1
- package/lib/src/controllers/UtilsController.d.ts +10 -4
- package/lib/src/controllers/UtilsController.js +10 -4
- package/lib/src/controllers/UtilsController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +78 -34
- package/lib/src/controllers/VariableController.js +106 -53
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +4 -3
- package/lib/src/index.js +5 -4
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/connector.d.ts +4 -3
- package/lib/src/interactions/connector.js +7 -3
- package/lib/src/interactions/connector.js.map +1 -1
- package/lib/src/tests/__mocks__/FrameProperties.d.ts +2 -2
- package/lib/src/tests/__mocks__/FrameProperties.js +2 -2
- package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js +5 -5
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
- package/lib/src/tests/__mocks__/animations.js +1 -1
- package/lib/src/tests/__mocks__/animations.js.map +1 -1
- package/lib/src/tests/__mocks__/mockDocument.d.ts +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js +18 -9
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/AnimationController.test.js +14 -14
- package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +11 -11
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js +17 -17
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ConnectorController.test.js +6 -6
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DebugController.test.js +1 -1
- package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
- package/lib/src/tests/controllers/DocumentController.test.js +6 -6
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
- package/lib/src/tests/controllers/ExperimentController.test.js +29 -1
- package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js +11 -11
- package/lib/src/tests/controllers/FontController.test.js +11 -11
- package/lib/src/tests/controllers/FontController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +113 -113
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js +25 -27
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js +1 -1
- package/lib/src/tests/controllers/PageController.test.js +11 -11
- package/lib/src/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +12 -12
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ShapeController.test.js +26 -26
- package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +7 -7
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/TextStyleController.test.js +6 -6
- package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ToolController.test.js +9 -9
- package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js +20 -0
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +62 -31
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/interactions/connector.test.js +14 -0
- package/lib/src/tests/interactions/connector.test.js.map +1 -1
- package/lib/src/tests/utils/getClaculatedValue.test.js +2 -2
- package/lib/src/tests/utils/getClaculatedValue.test.js.map +1 -1
- package/lib/src/types/ActionTypes.d.ts +3 -3
- package/lib/src/types/AnimationTypes.d.ts +3 -3
- package/lib/src/types/CharacterStyleTypes.d.ts +2 -1
- package/lib/src/types/ColorStyleTypes.d.ts +8 -7
- package/lib/src/types/ColorStyleTypes.js +1 -1
- package/lib/src/types/ColorStyleTypes.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +7 -5
- package/lib/src/types/ConfigurationTypes.d.ts +3 -0
- package/lib/src/types/ConnectorTypes.d.ts +5 -4
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DocumentTypes.d.ts +23 -25
- package/lib/src/types/DocumentTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +2 -1
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FontTypes.d.ts +5 -4
- package/lib/src/types/FrameTypes.d.ts +20 -20
- package/lib/src/types/LayoutTypes.d.ts +14 -14
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/lib/src/types/MediaConnectorTypes.d.ts +2 -1
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/types/PageTypes.d.ts +3 -3
- package/lib/src/types/ParagraphStyleTypes.d.ts +6 -5
- package/lib/src/types/TextStyleTypes.d.ts +5 -5
- package/lib/src/types/TextStyleTypes.js +1 -1
- package/lib/src/types/TextStyleTypes.js.map +1 -1
- package/lib/src/types/TextTypes.d.ts +4 -0
- package/lib/src/types/TextTypes.js +6 -0
- package/lib/src/types/TextTypes.js.map +1 -0
- package/lib/src/types/VariableTypes.d.ts +12 -11
- package/lib/src/types/VariableTypes.js +3 -2
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/lib/src/utils/enums.d.ts +8 -3
- package/lib/src/utils/enums.js +19 -13
- package/lib/src/utils/enums.js.map +1 -1
- package/lib/src/utils/getCalculatedValue.js +2 -2
- package/package.json +1 -1
|
@@ -38,329 +38,329 @@ export class FrameController {
|
|
|
38
38
|
_FrameController_editorAPI.set(this, void 0);
|
|
39
39
|
/**
|
|
40
40
|
* This method returns the list of frames
|
|
41
|
-
* @returns
|
|
41
|
+
* @returns list of all frames
|
|
42
42
|
*/
|
|
43
|
-
this.
|
|
43
|
+
this.getAll = () => __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
45
45
|
return res.getFrames().then((result) => getEditorResponseData(result));
|
|
46
46
|
});
|
|
47
47
|
/**
|
|
48
48
|
* This method returns the list of selected frames
|
|
49
|
-
* @returns
|
|
49
|
+
* @returns list of all selected frames
|
|
50
50
|
*/
|
|
51
|
-
this.
|
|
51
|
+
this.getSelected = () => __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
53
53
|
return res.getSelectedFrames().then((result) => getEditorResponseData(result));
|
|
54
54
|
});
|
|
55
55
|
/**
|
|
56
|
-
* This method returns the list of frames by
|
|
57
|
-
* @param
|
|
58
|
-
* @returns
|
|
56
|
+
* This method returns the list of frames by id
|
|
57
|
+
* @param id the id of a specific page
|
|
58
|
+
* @returns list of all frames by id
|
|
59
59
|
*/
|
|
60
|
-
this.
|
|
60
|
+
this.getAllByPageId = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
61
61
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
62
|
-
return res.getFramesByPageId(
|
|
62
|
+
return res.getFramesByPageId(id).then((result) => getEditorResponseData(result));
|
|
63
63
|
});
|
|
64
64
|
/**
|
|
65
65
|
* This method returns a frame by its name
|
|
66
|
-
* @param name
|
|
67
|
-
* @returns
|
|
66
|
+
* @param name the name of a specific frame
|
|
67
|
+
* @returns frame properties
|
|
68
68
|
*/
|
|
69
|
-
this.
|
|
69
|
+
this.getByName = (name) => __awaiter(this, void 0, void 0, function* () {
|
|
70
70
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
71
71
|
return res.getFrameByName(name).then((result) => getEditorResponseData(result));
|
|
72
72
|
});
|
|
73
73
|
/**
|
|
74
74
|
* This method returns a frame by its id
|
|
75
|
-
* @param id
|
|
76
|
-
* @returns
|
|
75
|
+
* @param id the id of a specific frame
|
|
76
|
+
* @returns frame properties
|
|
77
77
|
*/
|
|
78
|
-
this.
|
|
78
|
+
this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
79
79
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
80
80
|
return res.getFrameById(id).then((result) => getEditorResponseData(result));
|
|
81
81
|
});
|
|
82
82
|
/**
|
|
83
83
|
* This method returns all frame properties on current layout
|
|
84
|
-
* @returns
|
|
84
|
+
* @returns all frame properties on current layout
|
|
85
85
|
*/
|
|
86
|
-
this.
|
|
86
|
+
this.getPropertiesOnSelectedLayout = () => __awaiter(this, void 0, void 0, function* () {
|
|
87
87
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
88
88
|
return res
|
|
89
89
|
.getFramePropertiesOnSelectedLayout()
|
|
90
90
|
.then((result) => getEditorResponseData(result));
|
|
91
91
|
});
|
|
92
92
|
/**
|
|
93
|
-
* This method returns frame properties for a given frame and layout
|
|
94
|
-
* @param
|
|
95
|
-
* @param layoutId
|
|
96
|
-
* @returns
|
|
93
|
+
* This method returns frame layout properties for a given frame and layout
|
|
94
|
+
* @param id the id of a specific frame
|
|
95
|
+
* @param layoutId the id of a specific layout
|
|
96
|
+
* @returns frame layout properties
|
|
97
97
|
*/
|
|
98
|
-
this.
|
|
98
|
+
this.getLayoutProperties = (id, layoutId) => __awaiter(this, void 0, void 0, function* () {
|
|
99
99
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
100
100
|
return res
|
|
101
|
-
.getFramePropertiesByFrameId(
|
|
101
|
+
.getFramePropertiesByFrameId(id, layoutId)
|
|
102
102
|
.then((result) => getEditorResponseData(result));
|
|
103
103
|
});
|
|
104
104
|
/**
|
|
105
|
-
* This method returns frame properties for a given layout
|
|
106
|
-
* @param
|
|
107
|
-
* @returns
|
|
105
|
+
* This method returns a list of frame properties for a given layout
|
|
106
|
+
* @param id the id of a specific layout
|
|
107
|
+
* @returns list of frame layout properties
|
|
108
108
|
*/
|
|
109
|
-
this.
|
|
109
|
+
this.getAllLayoutProperties = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
110
110
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
111
|
-
return res.getFramesProperties(
|
|
111
|
+
return res.getFramesProperties(id).then((result) => getEditorResponseData(result));
|
|
112
112
|
});
|
|
113
113
|
/**
|
|
114
114
|
* This method will reset the frame size (width and height) to the frame's original value
|
|
115
|
-
* @param
|
|
115
|
+
* @param id the id of a specific frame
|
|
116
116
|
* @returns
|
|
117
117
|
*/
|
|
118
|
-
this.
|
|
118
|
+
this.resetSize = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
119
119
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
120
|
-
return res.resetFrameSize(
|
|
120
|
+
return res.resetFrameSize(id).then((result) => getEditorResponseData(result));
|
|
121
121
|
});
|
|
122
122
|
/**
|
|
123
123
|
* This method will select a specific frame
|
|
124
|
-
* @param
|
|
124
|
+
* @param id the id of a specific frame
|
|
125
125
|
* @returns
|
|
126
126
|
*/
|
|
127
|
-
this.
|
|
127
|
+
this.select = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
128
128
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
129
|
-
return res.selectFrames([
|
|
129
|
+
return res.selectFrames([id]).then((result) => getEditorResponseData(result));
|
|
130
130
|
});
|
|
131
131
|
/**
|
|
132
132
|
* This method will select multipleFrames
|
|
133
|
-
* @param
|
|
133
|
+
* @param ids An array of all ids you want to select
|
|
134
134
|
* @returns
|
|
135
135
|
*/
|
|
136
|
-
this.
|
|
136
|
+
this.selectMultiple = (ids) => __awaiter(this, void 0, void 0, function* () {
|
|
137
137
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
138
|
-
return res.selectFrames(
|
|
138
|
+
return res.selectFrames(ids).then((result) => getEditorResponseData(result));
|
|
139
139
|
});
|
|
140
140
|
/**
|
|
141
141
|
* This method changes the order of frames in the z-index list.
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
142
|
+
* @param order the index in the list to move to
|
|
143
|
+
* @param ids An array of all IDs you want to move to the given index
|
|
144
144
|
* @returns
|
|
145
145
|
*/
|
|
146
|
-
this.reorderFrames = (
|
|
146
|
+
this.reorderFrames = (order, ids) => __awaiter(this, void 0, void 0, function* () {
|
|
147
147
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
148
|
-
return res.reorderFrames(
|
|
148
|
+
return res.reorderFrames(order, ids).then((result) => getEditorResponseData(result));
|
|
149
149
|
});
|
|
150
150
|
/**
|
|
151
151
|
* This method will update the z-index of a frame.
|
|
152
|
-
* @param
|
|
153
|
-
* @param method
|
|
152
|
+
* @param id the id of the frame you want to change the z-index of
|
|
153
|
+
* @param method the z-index update method to perform
|
|
154
154
|
* @returns
|
|
155
155
|
*/
|
|
156
|
-
this.
|
|
156
|
+
this.setZIndex = (id, method) => __awaiter(this, void 0, void 0, function* () {
|
|
157
157
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
158
|
-
return res.setFrameZIndex(
|
|
158
|
+
return res.setFrameZIndex(id, method).then((result) => getEditorResponseData(result));
|
|
159
159
|
});
|
|
160
160
|
/**
|
|
161
161
|
* This method will set the height of a specific frame
|
|
162
|
-
* @param
|
|
163
|
-
* @param
|
|
162
|
+
* @param id the id of a specific frame
|
|
163
|
+
* @param height the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
164
164
|
* @returns
|
|
165
165
|
*/
|
|
166
|
-
this.
|
|
166
|
+
this.setHeight = (id, height) => __awaiter(this, void 0, void 0, function* () {
|
|
167
167
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
168
|
-
const calc = getCalculatedValue(
|
|
168
|
+
const calc = getCalculatedValue(height);
|
|
169
169
|
if (calc === null || calc === Infinity) {
|
|
170
170
|
return null;
|
|
171
171
|
}
|
|
172
172
|
return res
|
|
173
|
-
.setFrameHeight(
|
|
173
|
+
.setFrameHeight(id, parseFloat(calc.toString()))
|
|
174
174
|
.then((result) => getEditorResponseData(result));
|
|
175
175
|
});
|
|
176
176
|
/**
|
|
177
177
|
* This method will set the rotation angle of a specific frame
|
|
178
|
-
* @param
|
|
179
|
-
* @param
|
|
178
|
+
* @param id the id of a specific frame
|
|
179
|
+
* @param rotation the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
180
180
|
* @returns
|
|
181
181
|
*/
|
|
182
|
-
this.
|
|
182
|
+
this.setRotation = (id, rotation) => __awaiter(this, void 0, void 0, function* () {
|
|
183
183
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
184
|
-
const calc = getCalculatedValue(
|
|
184
|
+
const calc = getCalculatedValue(rotation);
|
|
185
185
|
if (calc === null || calc === Infinity) {
|
|
186
186
|
return null;
|
|
187
187
|
}
|
|
188
188
|
return res
|
|
189
|
-
.setFrameRotation(
|
|
189
|
+
.setFrameRotation(id, parseFloat(calc.toString()))
|
|
190
190
|
.then((result) => getEditorResponseData(result));
|
|
191
191
|
});
|
|
192
192
|
/**
|
|
193
193
|
* This method will set the width of a specific frame
|
|
194
|
-
* @param
|
|
195
|
-
* @param
|
|
194
|
+
* @param id the id of a specific frame
|
|
195
|
+
* @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
196
196
|
* @returns
|
|
197
197
|
*/
|
|
198
|
-
this.
|
|
198
|
+
this.setWidth = (id, width) => __awaiter(this, void 0, void 0, function* () {
|
|
199
199
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
200
|
-
const calc = getCalculatedValue(
|
|
200
|
+
const calc = getCalculatedValue(width);
|
|
201
201
|
if (calc === null || calc === Infinity) {
|
|
202
202
|
return null;
|
|
203
203
|
}
|
|
204
204
|
return res
|
|
205
|
-
.setFrameWidth(
|
|
205
|
+
.setFrameWidth(id, parseFloat(calc.toString()))
|
|
206
206
|
.then((result) => getEditorResponseData(result));
|
|
207
207
|
});
|
|
208
208
|
/**
|
|
209
209
|
* This method will set the x value of a specific frame
|
|
210
|
-
* @param
|
|
211
|
-
* @param
|
|
210
|
+
* @param id the id of a specific frame
|
|
211
|
+
* @param XValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
212
212
|
* @returns
|
|
213
213
|
*/
|
|
214
|
-
this.
|
|
214
|
+
this.setX = (id, XValue) => __awaiter(this, void 0, void 0, function* () {
|
|
215
215
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
216
|
-
const calc = getCalculatedValue(
|
|
216
|
+
const calc = getCalculatedValue(XValue);
|
|
217
217
|
if (calc === null || calc === Infinity) {
|
|
218
218
|
return null;
|
|
219
219
|
}
|
|
220
220
|
return res
|
|
221
|
-
.setFrameX(
|
|
221
|
+
.setFrameX(id, parseFloat(calc.toString()))
|
|
222
222
|
.then((result) => getEditorResponseData(result));
|
|
223
223
|
});
|
|
224
224
|
/**
|
|
225
225
|
* This method will set the y value of a specific frame
|
|
226
|
-
* @param
|
|
227
|
-
* @param
|
|
226
|
+
* @param id the id of a specific frame
|
|
227
|
+
* @param YValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels
|
|
228
228
|
* @returns
|
|
229
229
|
*/
|
|
230
|
-
this.
|
|
230
|
+
this.setY = (id, YValue) => __awaiter(this, void 0, void 0, function* () {
|
|
231
231
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
232
|
-
const calc = getCalculatedValue(
|
|
232
|
+
const calc = getCalculatedValue(YValue);
|
|
233
233
|
if (calc === null || calc === Infinity) {
|
|
234
234
|
return null;
|
|
235
235
|
}
|
|
236
236
|
return res
|
|
237
|
-
.setFrameY(
|
|
237
|
+
.setFrameY(id, parseFloat(calc.toString()))
|
|
238
238
|
.then((result) => getEditorResponseData(result));
|
|
239
239
|
});
|
|
240
240
|
/**
|
|
241
241
|
* This method will update the name of a specific frame
|
|
242
|
-
* @param
|
|
243
|
-
* @param
|
|
242
|
+
* @param id the id of a specific frame
|
|
243
|
+
* @param name the new name that the frame should receive
|
|
244
244
|
* @returns
|
|
245
245
|
*/
|
|
246
|
-
this.
|
|
246
|
+
this.rename = (id, name) => __awaiter(this, void 0, void 0, function* () {
|
|
247
247
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
248
|
-
return res.renameFrame(
|
|
248
|
+
return res.renameFrame(id, name).then((result) => getEditorResponseData(result));
|
|
249
249
|
});
|
|
250
250
|
/**
|
|
251
251
|
* This method will reset properties of a specific frame to their original values
|
|
252
|
-
* @param
|
|
252
|
+
* @param id the id of the frame that needs to get reset
|
|
253
253
|
* @returns
|
|
254
254
|
*/
|
|
255
|
-
this.
|
|
255
|
+
this.reset = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
256
256
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
257
|
-
return res.resetFrame(
|
|
257
|
+
return res.resetFrame(id).then((result) => getEditorResponseData(result));
|
|
258
258
|
});
|
|
259
259
|
/**
|
|
260
260
|
* This method will reset the x value of a specific frame to its original value
|
|
261
|
-
* @param
|
|
261
|
+
* @param id the id of the frame that needs to get reset
|
|
262
262
|
* @returns
|
|
263
263
|
*/
|
|
264
|
-
this.
|
|
264
|
+
this.resetX = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
265
265
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
266
|
-
return res.resetFrameX(
|
|
266
|
+
return res.resetFrameX(id).then((result) => getEditorResponseData(result));
|
|
267
267
|
});
|
|
268
268
|
/**
|
|
269
269
|
* This method will reset the y value of a specific frame to its original value
|
|
270
|
-
* @param
|
|
270
|
+
* @param id the id of the frame that needs to get reset
|
|
271
271
|
* @returns
|
|
272
272
|
*/
|
|
273
|
-
this.
|
|
273
|
+
this.resetY = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
274
274
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
275
|
-
return res.resetFrameY(
|
|
275
|
+
return res.resetFrameY(id).then((result) => getEditorResponseData(result));
|
|
276
276
|
});
|
|
277
277
|
/**
|
|
278
278
|
* This method will reset the rotation value of a specific frame to its original value
|
|
279
|
-
* @param
|
|
279
|
+
* @param id the id of the frame that needs to get reset
|
|
280
280
|
* @returns
|
|
281
281
|
*/
|
|
282
|
-
this.
|
|
282
|
+
this.resetRotation = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
283
283
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
284
|
-
return res.resetFrameRotation(
|
|
284
|
+
return res.resetFrameRotation(id).then((result) => getEditorResponseData(result));
|
|
285
285
|
});
|
|
286
286
|
/**
|
|
287
287
|
* This method will reset the width of a specific frame to its original value
|
|
288
|
-
* @param
|
|
288
|
+
* @param id the id of the frame that needs to get reset
|
|
289
289
|
* @returns
|
|
290
290
|
*/
|
|
291
|
-
this.
|
|
291
|
+
this.resetWidth = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
292
292
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
293
|
-
return res.resetFrameWidth(
|
|
293
|
+
return res.resetFrameWidth(id).then((result) => getEditorResponseData(result));
|
|
294
294
|
});
|
|
295
295
|
/**
|
|
296
296
|
* This method will reset the height of a specific frame to its original value
|
|
297
|
-
* @param
|
|
297
|
+
* @param id the id of the frame that needs to get reset
|
|
298
298
|
* @returns
|
|
299
299
|
*/
|
|
300
|
-
this.
|
|
300
|
+
this.resetHeight = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
301
301
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
302
|
-
return res.resetFrameHeight(
|
|
302
|
+
return res.resetFrameHeight(id).then((result) => getEditorResponseData(result));
|
|
303
303
|
});
|
|
304
304
|
/**
|
|
305
305
|
* This method will reset the fitMode property of a specific frame to its original value
|
|
306
|
-
* @param
|
|
306
|
+
* @param id the id of the frame that needs to get reset
|
|
307
307
|
* @returns
|
|
308
308
|
*/
|
|
309
|
-
this.resetImageFrameFitMode = (
|
|
309
|
+
this.resetImageFrameFitMode = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
310
310
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
311
|
-
return res.resetImageFrameFitMode(
|
|
311
|
+
return res.resetImageFrameFitMode(id).then((result) => getEditorResponseData(result));
|
|
312
312
|
});
|
|
313
313
|
/**
|
|
314
314
|
* This method will set the visibility property of a specified frame. If set to false the frame will be invisible and vice versa.
|
|
315
|
-
* @param
|
|
315
|
+
* @param id the id of the frame that needs to get updated
|
|
316
316
|
* @param value True means the frame gets visible, false means the frame gets invisible
|
|
317
317
|
* @returns
|
|
318
318
|
*/
|
|
319
|
-
this.
|
|
319
|
+
this.setVisibility = (id, value) => __awaiter(this, void 0, void 0, function* () {
|
|
320
320
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
321
|
-
return res.setFrameVisibility(
|
|
321
|
+
return res.setFrameVisibility(id, value).then((result) => getEditorResponseData(result));
|
|
322
322
|
});
|
|
323
323
|
/**
|
|
324
324
|
* This method will remove a specific frame using the Id.
|
|
325
|
-
* @param
|
|
325
|
+
* @param id the id of the frame that needs to be deleted
|
|
326
326
|
* @returns
|
|
327
327
|
*/
|
|
328
|
-
this.
|
|
328
|
+
this.remove = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
329
329
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
330
|
-
return res.removeFrame(
|
|
330
|
+
return res.removeFrame(id).then((result) => getEditorResponseData(result));
|
|
331
331
|
});
|
|
332
332
|
/**
|
|
333
|
-
* This method will
|
|
333
|
+
* This method will create a new frame of 'type' to the template positioned on the requested
|
|
334
334
|
* coordinates.
|
|
335
|
-
* @param
|
|
335
|
+
* @param type the type of frame to create
|
|
336
336
|
* @param x X coordinate of the new frame within the template
|
|
337
337
|
* @param y Y coordinate of the new frame within the template
|
|
338
338
|
* @param width Width of the new frame within the template
|
|
339
339
|
* @param height Height of the new frame within the template
|
|
340
|
-
* @returns
|
|
340
|
+
* @returns the newly created frame's id
|
|
341
341
|
*/
|
|
342
|
-
this.
|
|
342
|
+
this.create = (type, x, y, width, height) => __awaiter(this, void 0, void 0, function* () {
|
|
343
343
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
344
|
-
return res.addFrame(
|
|
344
|
+
return res.addFrame(type, x, y, width, height).then((result) => getEditorResponseData(result));
|
|
345
345
|
});
|
|
346
346
|
/**
|
|
347
|
-
* This method will
|
|
347
|
+
* This method will create a new frame of 'type' type to the template positioned on the requested
|
|
348
348
|
* coordinates.
|
|
349
|
-
* @param
|
|
349
|
+
* @param type the type of frame to create
|
|
350
350
|
* @param x X coordinate of the new frame within the template
|
|
351
351
|
* @param y Y coordinate of the new frame within the template
|
|
352
352
|
* @param width Width of the new frame within the template
|
|
353
353
|
* @param height Height of the new frame within the template
|
|
354
|
-
* @returns
|
|
354
|
+
* @returns the newly created shape frame's id
|
|
355
355
|
*/
|
|
356
|
-
this.
|
|
356
|
+
this.createShapeFrame = (type, x, y, width, height) => __awaiter(this, void 0, void 0, function* () {
|
|
357
357
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
358
|
-
return res.addFrame(
|
|
358
|
+
return res.addFrame(type, x, y, width, height).then((result) => getEditorResponseData(result));
|
|
359
359
|
});
|
|
360
360
|
/**
|
|
361
361
|
* This method sets or removes the image source to the ImageFrame
|
|
362
|
-
* @param imageFrameId
|
|
363
|
-
* @param
|
|
362
|
+
* @param imageFrameId the id of the imageFrame where an image needs to be assigned to
|
|
363
|
+
* @param newImageSource A new image source
|
|
364
364
|
* @returns
|
|
365
365
|
*/
|
|
366
366
|
this.updateImageSource = (imageFrameId, src) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -370,41 +370,41 @@ export class FrameController {
|
|
|
370
370
|
});
|
|
371
371
|
/**
|
|
372
372
|
* This method removes the image source from the ImageFrame
|
|
373
|
-
* @param imageFrameId
|
|
373
|
+
* @param imageFrameId the id of the imageFrame where an image needs to be removed from
|
|
374
374
|
*/
|
|
375
375
|
this.removeImageSource = (imageFrameId) => __awaiter(this, void 0, void 0, function* () {
|
|
376
376
|
return this.updateImageSource(imageFrameId, null);
|
|
377
377
|
});
|
|
378
378
|
/**
|
|
379
379
|
* This method will assign an image from a mediaConnector to the correct ImageFrame
|
|
380
|
-
* @param
|
|
381
|
-
* @param
|
|
382
|
-
* @param
|
|
380
|
+
* @param id Unique Id of the media connector
|
|
381
|
+
* @param imageFrameId the id of the imageFrame where an image needs to be assigned to
|
|
382
|
+
* @param assetId Unique id of the asset that you want to assign to the imageFrame
|
|
383
383
|
* @returns
|
|
384
384
|
*/
|
|
385
|
-
this.setImageFromConnector = (imageFrameId, connectorId,
|
|
385
|
+
this.setImageFromConnector = (imageFrameId, connectorId, assetId) => __awaiter(this, void 0, void 0, function* () {
|
|
386
386
|
const src = {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
387
|
+
id: connectorId,
|
|
388
|
+
assetId,
|
|
389
|
+
type: ImageSourceTypeEnum.connector,
|
|
390
390
|
};
|
|
391
391
|
return this.updateImageSource(imageFrameId, src);
|
|
392
392
|
});
|
|
393
393
|
/**
|
|
394
394
|
* This method will assign an image from url to the correct ImageFrame
|
|
395
395
|
* Make sure the url can be accessed by the editor.
|
|
396
|
-
* @param imageFrameId
|
|
396
|
+
* @param imageFrameId the id of the imageFrame where an image needs to be assigned to
|
|
397
397
|
* @param url A valid image uri
|
|
398
398
|
* @returns
|
|
399
399
|
*/
|
|
400
400
|
this.setImageFromUrl = (imageFrameId, url) => __awaiter(this, void 0, void 0, function* () {
|
|
401
|
-
const
|
|
402
|
-
return this.updateImageSource(imageFrameId,
|
|
401
|
+
const source = { url: url, type: ImageSourceTypeEnum.url };
|
|
402
|
+
return this.updateImageSource(imageFrameId, source);
|
|
403
403
|
});
|
|
404
404
|
/**
|
|
405
405
|
* This method will set the fitMode property of a specified image frame.
|
|
406
|
-
* @param imageFrameId
|
|
407
|
-
* @param fitMode
|
|
406
|
+
* @param imageFrameId the id of the imageFrame that needs to get updated.
|
|
407
|
+
* @param fitMode the new fitMode that you want to set to the imageFrame.
|
|
408
408
|
* @returns
|
|
409
409
|
*/
|
|
410
410
|
this.setImageFrameFitMode = (imageFrameId, fitMode) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -413,98 +413,98 @@ export class FrameController {
|
|
|
413
413
|
});
|
|
414
414
|
/**
|
|
415
415
|
* This method will set the constrainProportions property of a specified frame.
|
|
416
|
-
* @param
|
|
416
|
+
* @param id the id of the frame that needs to get updated.
|
|
417
417
|
* @param constrainProportions The new constraint that you want to set to the frame.
|
|
418
418
|
* @returns
|
|
419
419
|
*/
|
|
420
|
-
this.setFrameConstrainProportions = (
|
|
420
|
+
this.setFrameConstrainProportions = (id, constrainProportions) => __awaiter(this, void 0, void 0, function* () {
|
|
421
421
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
422
422
|
return res
|
|
423
|
-
.setFrameConstrainProportions(
|
|
423
|
+
.setFrameConstrainProportions(id, constrainProportions)
|
|
424
424
|
.then((result) => getEditorResponseData(result));
|
|
425
425
|
});
|
|
426
426
|
/**
|
|
427
427
|
* This method will set the vertical alignment property of a specified frame.
|
|
428
|
-
* @param
|
|
429
|
-
* @param verticalAlign
|
|
428
|
+
* @param id the id of the frame that needs to get updated
|
|
429
|
+
* @param verticalAlign the new vertical alignment to be set to the frame.
|
|
430
430
|
* @returns
|
|
431
431
|
*/
|
|
432
|
-
this.
|
|
432
|
+
this.setVerticalAlign = (id, verticalAlign) => __awaiter(this, void 0, void 0, function* () {
|
|
433
433
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
434
|
-
return res.setVerticalAlignment(
|
|
434
|
+
return res.setVerticalAlignment(id, verticalAlign).then((result) => getEditorResponseData(result));
|
|
435
435
|
});
|
|
436
436
|
/**
|
|
437
437
|
* This method will set the min copyFitting property of a specified frame.
|
|
438
|
-
* @param
|
|
439
|
-
* @param value
|
|
438
|
+
* @param id the id of the frame that needs to get updated
|
|
439
|
+
* @param value the new min copyFitting value to be set to the frame.
|
|
440
440
|
* @returns
|
|
441
441
|
*/
|
|
442
|
-
this.setMinCopyfitting = (
|
|
442
|
+
this.setMinCopyfitting = (id, value) => __awaiter(this, void 0, void 0, function* () {
|
|
443
443
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
444
444
|
const calc = getCalculatedValue(value);
|
|
445
445
|
if (calc === null || calc === Infinity) {
|
|
446
446
|
return null;
|
|
447
447
|
}
|
|
448
448
|
return res
|
|
449
|
-
.setMinCopyfitting(
|
|
449
|
+
.setMinCopyfitting(id, parseFloat(calc.toString()))
|
|
450
450
|
.then((result) => getEditorResponseData(result));
|
|
451
451
|
});
|
|
452
452
|
/**
|
|
453
453
|
* This method will set the max copyFitting property of a specified frame.
|
|
454
|
-
* @param
|
|
455
|
-
* @param value
|
|
454
|
+
* @param id the id of the frame that needs to get updated
|
|
455
|
+
* @param value the new max copyFitting value to be set to the frame.
|
|
456
456
|
* @returns
|
|
457
457
|
*/
|
|
458
|
-
this.setMaxCopyfitting = (
|
|
458
|
+
this.setMaxCopyfitting = (id, value) => __awaiter(this, void 0, void 0, function* () {
|
|
459
459
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
460
460
|
const calc = getCalculatedValue(value);
|
|
461
461
|
if (calc === null || calc === Infinity) {
|
|
462
462
|
return null;
|
|
463
463
|
}
|
|
464
464
|
return res
|
|
465
|
-
.setMaxCopyfitting(
|
|
465
|
+
.setMaxCopyfitting(id, parseFloat(calc.toString()))
|
|
466
466
|
.then((result) => getEditorResponseData(result));
|
|
467
467
|
});
|
|
468
468
|
/**
|
|
469
469
|
* This method will enable copyFitting on a specified frame.
|
|
470
|
-
* @param
|
|
471
|
-
* @param value
|
|
470
|
+
* @param id the id of the frame that needs to get updated
|
|
471
|
+
* @param value the new value to be set to the frame.
|
|
472
472
|
* @returns
|
|
473
473
|
*/
|
|
474
|
-
this.setEnableCopyfitting = (
|
|
474
|
+
this.setEnableCopyfitting = (id, value) => __awaiter(this, void 0, void 0, function* () {
|
|
475
475
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
476
|
-
return res.setEnableCopyfitting(
|
|
476
|
+
return res.setEnableCopyfitting(id, value).then((result) => getEditorResponseData(result));
|
|
477
477
|
});
|
|
478
478
|
/**
|
|
479
479
|
* This method will reset the frame minCopyfitting to the frame's original value
|
|
480
|
-
* @param
|
|
480
|
+
* @param id the id of a specific frame
|
|
481
481
|
* @returns
|
|
482
482
|
*/
|
|
483
|
-
this.resetMinCopyfitting = (
|
|
483
|
+
this.resetMinCopyfitting = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
484
484
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
485
|
-
return res.resetMinCopyfitting(
|
|
485
|
+
return res.resetMinCopyfitting(id).then((result) => getEditorResponseData(result));
|
|
486
486
|
});
|
|
487
487
|
/**
|
|
488
488
|
* This method will reset the frame maxCopyfitting to the frame's original value
|
|
489
|
-
* @param
|
|
489
|
+
* @param id the id of a specific frame
|
|
490
490
|
* @returns
|
|
491
491
|
*/
|
|
492
|
-
this.resetMaxCopyfitting = (
|
|
492
|
+
this.resetMaxCopyfitting = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
493
493
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
494
|
-
return res.resetMaxCopyfitting(
|
|
494
|
+
return res.resetMaxCopyfitting(id).then((result) => getEditorResponseData(result));
|
|
495
495
|
});
|
|
496
496
|
/**
|
|
497
497
|
* This method will reset the frame enableCopyfitting to the frame's original value
|
|
498
|
-
* @param
|
|
498
|
+
* @param id the id of a specific frame
|
|
499
499
|
* @returns
|
|
500
500
|
*/
|
|
501
|
-
this.resetEnableCopyfitting = (
|
|
501
|
+
this.resetEnableCopyfitting = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
502
502
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
503
|
-
return res.resetEnableCopyfitting(
|
|
503
|
+
return res.resetEnableCopyfitting(id).then((result) => getEditorResponseData(result));
|
|
504
504
|
});
|
|
505
505
|
/**
|
|
506
506
|
* This method will set the visibility of the shape fill.
|
|
507
|
-
* @param shapeFrameId
|
|
507
|
+
* @param shapeFrameId the id of the shapeFrame that needs to get updated.
|
|
508
508
|
* @param enableFill Whether the shape fill is visible.
|
|
509
509
|
* @returns
|
|
510
510
|
*/
|
|
@@ -513,8 +513,8 @@ export class FrameController {
|
|
|
513
513
|
});
|
|
514
514
|
/**
|
|
515
515
|
* This method will set the shape fill color of a specified shape frame.
|
|
516
|
-
* @param shapeFrameId
|
|
517
|
-
* @param fillColor
|
|
516
|
+
* @param shapeFrameId the id of the shapeFrame that needs to get updated.
|
|
517
|
+
* @param fillColor the new shape fill color that you want to set to the shapeFrame.
|
|
518
518
|
* @returns
|
|
519
519
|
*/
|
|
520
520
|
this.setShapeFrameFillColor = (shapeFrameId, fillColor) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -522,7 +522,7 @@ export class FrameController {
|
|
|
522
522
|
});
|
|
523
523
|
/**
|
|
524
524
|
* This method will set the visibility of the shape stroke.
|
|
525
|
-
* @param shapeFrameId
|
|
525
|
+
* @param shapeFrameId the id of the shapeFrame that needs to get updated.
|
|
526
526
|
* @param enableStroke Whether the shape stroke is visible.
|
|
527
527
|
* @returns
|
|
528
528
|
*/
|
|
@@ -531,8 +531,8 @@ export class FrameController {
|
|
|
531
531
|
});
|
|
532
532
|
/**
|
|
533
533
|
* This method will set the shape stroke color of a specified shape frame.
|
|
534
|
-
* @param shapeFrameId
|
|
535
|
-
* @param strokeColor
|
|
534
|
+
* @param shapeFrameId the id of the shapeFrame that needs to get updated.
|
|
535
|
+
* @param strokeColor the new shape stroke color that you want to set to the shapeFrame.
|
|
536
536
|
* @returns
|
|
537
537
|
*/
|
|
538
538
|
this.setShapeFrameStrokeColor = (shapeFrameId, strokeColor) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -540,8 +540,8 @@ export class FrameController {
|
|
|
540
540
|
});
|
|
541
541
|
/**
|
|
542
542
|
* This method will set the shape stroke weight of a specified shape frame.
|
|
543
|
-
* @param shapeFrameId
|
|
544
|
-
* @param strokeWeight
|
|
543
|
+
* @param shapeFrameId the id of the shapeFrame that needs to get updated.
|
|
544
|
+
* @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame.
|
|
545
545
|
* @returns
|
|
546
546
|
*/
|
|
547
547
|
this.setShapeFrameStrokeWeight = (shapeFrameId, strokeWeight) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -549,22 +549,22 @@ export class FrameController {
|
|
|
549
549
|
});
|
|
550
550
|
/**
|
|
551
551
|
* This method will set the blend mode of a specified shape frame
|
|
552
|
-
* @param
|
|
553
|
-
* @param blendMode
|
|
552
|
+
* @param id the id of a specific frame
|
|
553
|
+
* @param blendMode the blend mode
|
|
554
554
|
* @returns
|
|
555
555
|
*/
|
|
556
|
-
this.
|
|
556
|
+
this.setBlendMode = (id, blendMode) => __awaiter(this, void 0, void 0, function* () {
|
|
557
557
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
558
|
-
return res.setFrameBlendMode(
|
|
558
|
+
return res.setFrameBlendMode(id, blendMode).then((result) => getEditorResponseData(result));
|
|
559
559
|
});
|
|
560
560
|
/**
|
|
561
561
|
* This method will make the specified image frame go into cropping mode.
|
|
562
|
-
* @param
|
|
562
|
+
* @param id the id of a specific image frame
|
|
563
563
|
* @returns
|
|
564
564
|
*/
|
|
565
|
-
this.enterCropMode = (
|
|
565
|
+
this.enterCropMode = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
566
566
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
567
|
-
return res.enterCropMode(
|
|
567
|
+
return res.enterCropMode(id).then((result) => getEditorResponseData(result));
|
|
568
568
|
});
|
|
569
569
|
/**
|
|
570
570
|
* This method will exit cropping mode while saving the applied crop.
|
|
@@ -576,18 +576,18 @@ export class FrameController {
|
|
|
576
576
|
});
|
|
577
577
|
/**
|
|
578
578
|
* This method will reset the currently applied crop mode and apply the last selected fit mode again.
|
|
579
|
-
* @param
|
|
579
|
+
* @param id the id of a specific image frame
|
|
580
580
|
* @returns
|
|
581
581
|
*/
|
|
582
|
-
this.resetCropMode = (
|
|
582
|
+
this.resetCropMode = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
583
583
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
584
|
-
return res.resetCropMode(
|
|
584
|
+
return res.resetCropMode(id).then((result) => getEditorResponseData(result));
|
|
585
585
|
});
|
|
586
586
|
/**
|
|
587
587
|
* This method will exit cropping mode without saving the applied crop.
|
|
588
588
|
* @returns
|
|
589
589
|
*/
|
|
590
|
-
this.
|
|
590
|
+
this.exitCropMode = () => __awaiter(this, void 0, void 0, function* () {
|
|
591
591
|
const res = yield __classPrivateFieldGet(this, _FrameController_editorAPI, "f");
|
|
592
592
|
return res.cancelCropMode().then((result) => getEditorResponseData(result));
|
|
593
593
|
});
|