mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-23 07:08:47 -05:00
fix(lorem-ipsum-plugin): fix typing problem
This commit is contained in:
parent
2ba873f2cd
commit
218a62833d
1 changed files with 5 additions and 3 deletions
|
@ -46,10 +46,12 @@ function generateText(event: TextPluginUIEvent) {
|
||||||
|
|
||||||
if (!selection.length) {
|
if (!selection.length) {
|
||||||
const text = penpot.createText('lorem ipsum');
|
const text = penpot.createText('lorem ipsum');
|
||||||
|
if (text) {
|
||||||
text.x = penpot.viewport.center.x;
|
text.x = penpot.viewport.center.x;
|
||||||
text.y = penpot.viewport.center.y;
|
text.y = penpot.viewport.center.y;
|
||||||
selection.push(text);
|
selection.push(text);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
selection.forEach((it) => {
|
selection.forEach((it) => {
|
||||||
switch (event.generationType) {
|
switch (event.generationType) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue