|
@@ -868,6 +868,10 @@ class App extends React.Component<AppProps, AppState> {
|
|
this.state.activeEmbeddable?.element === el &&
|
|
this.state.activeEmbeddable?.element === el &&
|
|
this.state.activeEmbeddable?.state === "hover";
|
|
this.state.activeEmbeddable?.state === "hover";
|
|
|
|
|
|
|
|
+ // Modify the scale based on el.scale property
|
|
|
|
+ const [xScale, yScale] = el.scale;
|
|
|
|
+ const scaledTransform = `scale(${scale * xScale}, ${scale * yScale})`;
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div
|
|
<div
|
|
key={el.id}
|
|
key={el.id}
|
|
@@ -878,7 +882,7 @@ class App extends React.Component<AppProps, AppState> {
|
|
transform: isVisible
|
|
transform: isVisible
|
|
? `translate(${x - this.state.offsetLeft}px, ${
|
|
? `translate(${x - this.state.offsetLeft}px, ${
|
|
y - this.state.offsetTop
|
|
y - this.state.offsetTop
|
|
- }px) scale(${scale})`
|
|
|
|
|
|
+ }px) ${scaledTransform}`
|
|
: "none",
|
|
: "none",
|
|
display: isVisible ? "block" : "none",
|
|
display: isVisible ? "block" : "none",
|
|
opacity: el.opacity / 100,
|
|
opacity: el.opacity / 100,
|
|
@@ -907,8 +911,8 @@ class App extends React.Component<AppProps, AppState> {
|
|
}}*/
|
|
}}*/
|
|
className="excalidraw__embeddable-container__inner"
|
|
className="excalidraw__embeddable-container__inner"
|
|
style={{
|
|
style={{
|
|
- width: isVisible ? `${el.width}px` : 0,
|
|
|
|
- height: isVisible ? `${el.height}px` : 0,
|
|
|
|
|
|
+ width: isVisible ? `${el.width / xScale}px` : 0,
|
|
|
|
+ height: isVisible ? `${el.height / yScale}px` : 0,
|
|
transform: isVisible ? `rotate(${el.angle}rad)` : "none",
|
|
transform: isVisible ? `rotate(${el.angle}rad)` : "none",
|
|
pointerEvents: isActive
|
|
pointerEvents: isActive
|
|
? POINTER_EVENTS.enabled
|
|
? POINTER_EVENTS.enabled
|