Explorar o código

fix: Add width/height for the lines in charts (#2586)

Co-authored-by: David Luzar <luzar.david@gmail.com>
Lipis %!s(int64=4) %!d(string=hai) anos
pai
achega
ce52c18382
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 3 0
      src/charts.ts
  2. 1 0
      src/packages/excalidraw/CHANGELOG.MD

+ 3 - 0
src/charts.ts

@@ -192,6 +192,7 @@ export const renderSpreadsheet = (
     y,
     startArrowhead: null,
     endArrowhead: null,
+    width: chartWidth,
     points: [
       [0, 0],
       [chartWidth, 0],
@@ -205,6 +206,7 @@ export const renderSpreadsheet = (
     y,
     startArrowhead: null,
     endArrowhead: null,
+    height: chartHeight,
     points: [
       [0, 0],
       [0, -chartHeight],
@@ -220,6 +222,7 @@ export const renderSpreadsheet = (
     endArrowhead: null,
     ...commonProps,
     strokeStyle: "dotted",
+    width: chartWidth,
     points: [
       [0, 0],
       [chartWidth, 0],

+ 1 - 0
src/packages/excalidraw/CHANGELOG.MD

@@ -26,6 +26,7 @@ Please add the latest change on the top under the correct section.
 
 ### Fixes
 
+- Fix resizing the pasted charts [#2586](https://github.com/excalidraw/excalidraw/pull/2586)
 - Fix element visibility and zoom on cursor when canvas offset isn't 0. [#2534](https://github.com/excalidraw/excalidraw/pull/2534)
 - Fix Library Menu Layout [#2502](https://github.com/excalidraw/excalidraw/pull/2502)