@elementor/editor-components 3.35.0-428 → 3.35.0-430
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/dist/index.js +12 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
- package/src/components/edit-component/component-modal.tsx +11 -17
- package/src/create-component-type.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -1950,6 +1950,7 @@ function createComponentModel() {
|
|
|
1950
1950
|
this.set("componentId", componentId);
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
|
+
this.set("isGlobal", true);
|
|
1953
1954
|
},
|
|
1954
1955
|
getTitle() {
|
|
1955
1956
|
const editorSettings = this.get("editor_settings");
|
|
@@ -3191,7 +3192,7 @@ function Backdrop({ canvas, element, onClose }) {
|
|
|
3191
3192
|
zIndex: 999,
|
|
3192
3193
|
pointerEvents: "painted",
|
|
3193
3194
|
cursor: "pointer",
|
|
3194
|
-
clipPath:
|
|
3195
|
+
clipPath: getRectPath(rect, canvas.defaultView)
|
|
3195
3196
|
};
|
|
3196
3197
|
const handleKeyDown = (event) => {
|
|
3197
3198
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -3211,29 +3212,23 @@ function Backdrop({ canvas, element, onClose }) {
|
|
|
3211
3212
|
}
|
|
3212
3213
|
);
|
|
3213
3214
|
}
|
|
3214
|
-
function
|
|
3215
|
-
const padding = borderRadius / 2;
|
|
3215
|
+
function getRectPath(rect, viewport) {
|
|
3216
3216
|
const { x: originalX, y: originalY, width: originalWidth, height: originalHeight } = rect;
|
|
3217
|
-
const x = originalX
|
|
3218
|
-
const y = originalY
|
|
3219
|
-
const width = originalWidth
|
|
3220
|
-
const height = originalHeight
|
|
3221
|
-
const radius = Math.min(borderRadius, width / 2, height / 2);
|
|
3217
|
+
const x = originalX;
|
|
3218
|
+
const y = originalY;
|
|
3219
|
+
const width = originalWidth;
|
|
3220
|
+
const height = originalHeight;
|
|
3222
3221
|
const { innerWidth: vw, innerHeight: vh } = viewport;
|
|
3223
3222
|
const path = `path(evenodd, 'M 0 0
|
|
3224
3223
|
L ${vw} 0
|
|
3225
3224
|
L ${vw} ${vh}
|
|
3226
3225
|
L 0 ${vh}
|
|
3227
3226
|
Z
|
|
3228
|
-
M ${x
|
|
3229
|
-
L ${x + width
|
|
3230
|
-
|
|
3231
|
-
L ${x
|
|
3232
|
-
|
|
3233
|
-
L ${x + radius} ${y + height}
|
|
3234
|
-
A ${radius} ${radius} 0 0 1 ${x} ${y + height - radius}
|
|
3235
|
-
L ${x} ${y + radius}
|
|
3236
|
-
A ${radius} ${radius} 0 0 1 ${x + radius} ${y}
|
|
3227
|
+
M ${x} ${y}
|
|
3228
|
+
L ${x + width} ${y}
|
|
3229
|
+
L ${x + width} ${y + height}
|
|
3230
|
+
L ${x} ${y + height}
|
|
3231
|
+
L ${x} ${y}
|
|
3237
3232
|
Z'
|
|
3238
3233
|
)`;
|
|
3239
3234
|
return path.replace(/\s{2,}/g, " ");
|