@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.mjs
CHANGED
|
@@ -1945,6 +1945,7 @@ function createComponentModel() {
|
|
|
1945
1945
|
this.set("componentId", componentId);
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
|
+
this.set("isGlobal", true);
|
|
1948
1949
|
},
|
|
1949
1950
|
getTitle() {
|
|
1950
1951
|
const editorSettings = this.get("editor_settings");
|
|
@@ -3213,7 +3214,7 @@ function Backdrop({ canvas, element, onClose }) {
|
|
|
3213
3214
|
zIndex: 999,
|
|
3214
3215
|
pointerEvents: "painted",
|
|
3215
3216
|
cursor: "pointer",
|
|
3216
|
-
clipPath:
|
|
3217
|
+
clipPath: getRectPath(rect, canvas.defaultView)
|
|
3217
3218
|
};
|
|
3218
3219
|
const handleKeyDown = (event) => {
|
|
3219
3220
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -3233,29 +3234,23 @@ function Backdrop({ canvas, element, onClose }) {
|
|
|
3233
3234
|
}
|
|
3234
3235
|
);
|
|
3235
3236
|
}
|
|
3236
|
-
function
|
|
3237
|
-
const padding = borderRadius / 2;
|
|
3237
|
+
function getRectPath(rect, viewport) {
|
|
3238
3238
|
const { x: originalX, y: originalY, width: originalWidth, height: originalHeight } = rect;
|
|
3239
|
-
const x = originalX
|
|
3240
|
-
const y = originalY
|
|
3241
|
-
const width = originalWidth
|
|
3242
|
-
const height = originalHeight
|
|
3243
|
-
const radius = Math.min(borderRadius, width / 2, height / 2);
|
|
3239
|
+
const x = originalX;
|
|
3240
|
+
const y = originalY;
|
|
3241
|
+
const width = originalWidth;
|
|
3242
|
+
const height = originalHeight;
|
|
3244
3243
|
const { innerWidth: vw, innerHeight: vh } = viewport;
|
|
3245
3244
|
const path = `path(evenodd, 'M 0 0
|
|
3246
3245
|
L ${vw} 0
|
|
3247
3246
|
L ${vw} ${vh}
|
|
3248
3247
|
L 0 ${vh}
|
|
3249
3248
|
Z
|
|
3250
|
-
M ${x
|
|
3251
|
-
L ${x + width
|
|
3252
|
-
|
|
3253
|
-
L ${x
|
|
3254
|
-
|
|
3255
|
-
L ${x + radius} ${y + height}
|
|
3256
|
-
A ${radius} ${radius} 0 0 1 ${x} ${y + height - radius}
|
|
3257
|
-
L ${x} ${y + radius}
|
|
3258
|
-
A ${radius} ${radius} 0 0 1 ${x + radius} ${y}
|
|
3249
|
+
M ${x} ${y}
|
|
3250
|
+
L ${x + width} ${y}
|
|
3251
|
+
L ${x + width} ${y + height}
|
|
3252
|
+
L ${x} ${y + height}
|
|
3253
|
+
L ${x} ${y}
|
|
3259
3254
|
Z'
|
|
3260
3255
|
)`;
|
|
3261
3256
|
return path.replace(/\s{2,}/g, " ");
|