react-filerobot-image-editor
Version:
React component version of filerobot image editor (FIE).
1 lines • 1.19 kB
JavaScript
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["id","name","fill","x","y","radius","scaleX","scaleY","rotation","sides","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];import React from"react";import{RegularPolygon}from"react-konva";import nodesCommonPropTypes from"../nodesCommonPropTypes";var PolygonNode=function(a){var b=a.id,c=a.name,d=a.fill,e=void 0===d?"#000000":d,f=a.x,g=a.y,h=a.radius,i=a.scaleX,j=void 0===i?1:i,k=a.scaleY,l=void 0===k?1:k,m=a.rotation,n=void 0===m?0:m,o=a.sides,p=void 0===o?3:o,q=a.annotationEvents,r=a.stroke,s=a.strokeWidth,t=a.shadowOffsetX,u=a.shadowOffsetY,v=a.shadowBlur,w=a.shadowColor,x=a.shadowOpacity,y=a.opacity,z=void 0===y?1:y,A=_objectWithoutProperties(a,_excluded);return React.createElement(RegularPolygon,_extends({id:b,name:c,rotation:n,scaleX:j,scaleY:l,stroke:r,strokeWidth:s,shadowOffsetX:t,shadowOffsetY:u,shadowBlur:v,shadowColor:w,shadowOpacity:x,fill:e,x:f,y:g,radius:h,offsetX:-h,offsetY:-h,sides:p,opacity:z},q,A))};export default PolygonNode;