2
0
zsviczian 1 жил өмнө
parent
commit
0d60253de7

+ 1 - 1
src/components/App.tsx

@@ -927,7 +927,7 @@ class App extends React.Component<AppProps, AppState> {
                 <div
                 <div
                   className="excalidraw__embeddable__outer"
                   className="excalidraw__embeddable__outer"
                   style={{
                   style={{
-                    padding: `${el.strokeWidth}px`,
+                    padding: `${el.strokeWidth/el.scale[0]}px`,
                   }}
                   }}
                 >
                 >
                   {this.props.renderEmbeddable?.(el, this.state) ?? (
                   {this.props.renderEmbeddable?.(el, this.state) ?? (

+ 3 - 1
src/renderer/renderElement.ts

@@ -13,6 +13,7 @@ import {
   isInitializedImageElement,
   isInitializedImageElement,
   isArrowElement,
   isArrowElement,
   hasBoundTextElement,
   hasBoundTextElement,
+  isEmbeddableElement,
 } from "../element/typeChecks";
 } from "../element/typeChecks";
 import { getElementAbsoluteCoords } from "../element/bounds";
 import { getElementAbsoluteCoords } from "../element/bounds";
 import type { RoughCanvas } from "roughjs/bin/canvas";
 import type { RoughCanvas } from "roughjs/bin/canvas";
@@ -518,7 +519,8 @@ const drawElementFromCanvas = (
 
 
     if (
     if (
       "scale" in elementWithCanvas.element &&
       "scale" in elementWithCanvas.element &&
-      !isPendingImageElement(element, renderConfig)
+      !isPendingImageElement(element, renderConfig) &&
+      !isEmbeddableElement(element)
     ) {
     ) {
       context.scale(
       context.scale(
         elementWithCanvas.element.scale[0],
         elementWithCanvas.element.scale[0],