mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-02 21:00:12 -05:00
add circle shape
This commit is contained in:
parent
7e79137a52
commit
5ba81d3282
4 changed files with 11 additions and 1 deletions
|
@ -8,6 +8,7 @@ export const createPenpotCircle = (
|
|||
baseY: number
|
||||
) => {
|
||||
file.penpotFile.createCircle({
|
||||
type: Symbol.for('circle'),
|
||||
name: node.name,
|
||||
x: node.x + baseX,
|
||||
y: node.y + baseY,
|
||||
|
|
3
src/ui/lib/penpot.d.ts
vendored
3
src/ui/lib/penpot.d.ts
vendored
|
@ -1,4 +1,5 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { CircleShape } from './types/circle/circleShape';
|
||||
import { TextShape } from './types/text/textShape';
|
||||
|
||||
export interface PenpotFile {
|
||||
|
@ -11,7 +12,7 @@ export interface PenpotFile {
|
|||
addGroup(group: any): void;
|
||||
closeGroup(): void;
|
||||
createRect(rect: any): void;
|
||||
createCircle(circle: any): void;
|
||||
createCircle(circle: CircleShape): void;
|
||||
createText(options: TextShape): void;
|
||||
createImage(image: any): void;
|
||||
}
|
||||
|
|
4
src/ui/lib/types/circle/circleAttributes.d.ts
vendored
Normal file
4
src/ui/lib/types/circle/circleAttributes.d.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
export type CircleAttributes = {
|
||||
id?: string;
|
||||
type: symbol;
|
||||
};
|
4
src/ui/lib/types/circle/circleShape.d.ts
vendored
Normal file
4
src/ui/lib/types/circle/circleShape.d.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { Shape } from '../shape';
|
||||
import { CircleAttributes } from './circleAttributes';
|
||||
|
||||
export type CircleShape = Shape & CircleAttributes;
|
Loading…
Reference in a new issue