Browse Source

Merge remote-tracking branch 'origin/master' into aakansha-labelled-arrow-align

aakansha-labelled-arrow-align
Aakansha Doshi 3 years ago
parent
commit
2264a66241
  1. 2
      src/data/blob.ts
  2. 4
      src/element/textWysiwyg.tsx
  3. 2
      src/excalidraw-app/data/index.ts
  4. 3
      src/scene/Fonts.ts

2
src/data/blob.ts

@ -155,7 +155,7 @@ export const loadSceneOrLibraryFromBlob = async ( @@ -155,7 +155,7 @@ export const loadSceneOrLibraryFromBlob = async (
},
localAppState,
localElements,
{ repairBindings: true, refreshDimensions: true },
{ repairBindings: true, refreshDimensions: false },
),
};
} else if (isValidLibrary(data)) {

4
src/element/textWysiwyg.tsx

@ -233,8 +233,8 @@ export const textWysiwyg = ({ @@ -233,8 +233,8 @@ export const textWysiwyg = ({
);
mutateElement(container, { height: targetContainerHeight });
}
// Start pushing text upward until a diff of 30px (padding)
// is reached
// update y coord as you type, not needed for arrow as we calculate
// position from the container element for editor and canvas when rendering labelled arrows
else if (!isArrowElement(container)) {
const containerCoords = getContainerCoords(container);

2
src/excalidraw-app/data/index.ts

@ -263,7 +263,7 @@ export const loadScene = async ( @@ -263,7 +263,7 @@ export const loadScene = async (
await importFromBackend(id, privateKey),
localDataState?.appState,
localDataState?.elements,
{ repairBindings: true, refreshDimensions: true },
{ repairBindings: true, refreshDimensions: false },
);
} else {
data = restore(localDataState || null, null, null, {

3
src/scene/Fonts.ts

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
import { isTextElement, refreshTextDimensions } from "../element";
import { newElementWith } from "../element/mutateElement";
import { isBoundToContainer } from "../element/typeChecks";
import { ExcalidrawElement, ExcalidrawTextElement } from "../element/types";
import { invalidateShapeForElement } from "../renderer/renderElement";
import { getFontString } from "../utils";
@ -52,7 +53,7 @@ export class Fonts { @@ -52,7 +53,7 @@ export class Fonts {
let didUpdate = false;
this.scene.mapElements((element) => {
if (isTextElement(element)) {
if (isTextElement(element) && !isBoundToContainer(element)) {
invalidateShapeForElement(element);
didUpdate = true;
return newElementWith(element, {

Loading…
Cancel
Save