|
|
|
@ -42,7 +42,7 @@ import { |
|
|
|
redrawTextBoundingBox, |
|
|
|
redrawTextBoundingBox, |
|
|
|
} from "../element"; |
|
|
|
} from "../element"; |
|
|
|
import { newElementWith } from "../element/mutateElement"; |
|
|
|
import { newElementWith } from "../element/mutateElement"; |
|
|
|
import { getBoundedTextElement } from "../element/textElement"; |
|
|
|
import { getBoundTextElement } from "../element/textElement"; |
|
|
|
import { isLinearElement, isLinearElementType } from "../element/typeChecks"; |
|
|
|
import { isLinearElement, isLinearElementType } from "../element/typeChecks"; |
|
|
|
import { |
|
|
|
import { |
|
|
|
Arrowhead, |
|
|
|
Arrowhead, |
|
|
|
@ -495,9 +495,9 @@ export const actionChangeFontSize = register({ |
|
|
|
if (isTextElement(element)) { |
|
|
|
if (isTextElement(element)) { |
|
|
|
return element.fontSize; |
|
|
|
return element.fontSize; |
|
|
|
} |
|
|
|
} |
|
|
|
const boundedTextElement = getBoundedTextElement(element); |
|
|
|
const boundTextElement = getBoundTextElement(element); |
|
|
|
if (boundedTextElement) { |
|
|
|
if (boundTextElement) { |
|
|
|
return boundedTextElement.fontSize; |
|
|
|
return boundTextElement.fontSize; |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -576,9 +576,9 @@ export const actionChangeFontFamily = register({ |
|
|
|
if (isTextElement(element)) { |
|
|
|
if (isTextElement(element)) { |
|
|
|
return element.fontFamily; |
|
|
|
return element.fontFamily; |
|
|
|
} |
|
|
|
} |
|
|
|
const boundedTextElement = getBoundedTextElement(element); |
|
|
|
const boundTextElement = getBoundTextElement(element); |
|
|
|
if (boundedTextElement) { |
|
|
|
if (boundTextElement) { |
|
|
|
return boundedTextElement.fontFamily; |
|
|
|
return boundTextElement.fontFamily; |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -651,9 +651,9 @@ export const actionChangeTextAlign = register({ |
|
|
|
if (isTextElement(element)) { |
|
|
|
if (isTextElement(element)) { |
|
|
|
return element.textAlign; |
|
|
|
return element.textAlign; |
|
|
|
} |
|
|
|
} |
|
|
|
const boundedTextElement = getBoundedTextElement(element); |
|
|
|
const boundTextElement = getBoundTextElement(element); |
|
|
|
if (boundedTextElement) { |
|
|
|
if (boundTextElement) { |
|
|
|
return boundedTextElement.textAlign; |
|
|
|
return boundTextElement.textAlign; |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|