mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
5d7263bdbf
* Allow rotation for Ellipses, Rectangles and Texts * undo rotations for texts * Translate rotations for ellipses and rectangles
12 lines
453 B
TypeScript
12 lines
453 B
TypeScript
import { translateBlendMode } from '@plugin/translators';
|
|
|
|
import { ShapeAttributes } from '@ui/lib/types/shapes/shape';
|
|
|
|
export const transformBlend = (
|
|
node: SceneNodeMixin & MinimalBlendMixin
|
|
): Pick<ShapeAttributes, 'blendMode' | 'opacity'> => {
|
|
return {
|
|
blendMode: translateBlendMode(node.blendMode),
|
|
opacity: !node.visible ? 0 : node.opacity // @TODO: check this. If we use the property hidden and it's hidden, it won't export
|
|
};
|
|
};
|