mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
changing new shape property sets it as default (#520)
* changing new shape property sets it as default * set correct opacity while editing new test Co-authored-by: Christopher Chedeau <vjeuxx@gmail.com>
This commit is contained in:
parent
69061e20ac
commit
1bae203a78
5 changed files with 41 additions and 8 deletions
|
@ -7,6 +7,7 @@ type TextWysiwygParams = {
|
|||
y: number;
|
||||
strokeColor: string;
|
||||
font: string;
|
||||
opacity: number;
|
||||
onSubmit: (text: string) => void;
|
||||
onCancel: () => void;
|
||||
};
|
||||
|
@ -23,6 +24,7 @@ export function textWysiwyg({
|
|||
y,
|
||||
strokeColor,
|
||||
font,
|
||||
opacity,
|
||||
onSubmit,
|
||||
onCancel,
|
||||
}: TextWysiwygParams) {
|
||||
|
@ -38,6 +40,7 @@ export function textWysiwyg({
|
|||
Object.assign(editable.style, {
|
||||
color: strokeColor,
|
||||
position: "absolute",
|
||||
opacity: opacity / 100,
|
||||
top: y + "px",
|
||||
left: x + "px",
|
||||
transform: "translate(-50%, -50%)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue