UNPKG

react-filerobot-image-editor

Version:

React component version of filerobot image editor (FIE).

1 lines 1.19 kB
import _extends from"@babel/runtime/helpers/extends";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["id","name","scaleX","scaleY","rotation","annotationEvents","points","lineCap","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","tension","opacity"];import React from"react";import{Line}from"react-konva";import nodesCommonPropTypes from"../nodesCommonPropTypes";var LineNode=function(a){var b=a.id,c=a.name,d=a.scaleX,e=void 0===d?1:d,f=a.scaleY,g=void 0===f?1:f,h=a.rotation,i=void 0===h?0:h,j=a.annotationEvents,k=void 0===j?{}:j,l=a.points,m=a.lineCap,n=void 0===m?"butt":m,o=a.stroke,p=void 0===o?"#000000":o,q=a.strokeWidth,r=void 0===q?1:q,s=a.shadowOffsetX,t=a.shadowOffsetY,u=a.shadowBlur,v=a.shadowColor,w=a.shadowOpacity,x=a.tension,y=a.opacity,z=void 0===y?1:y,A=_objectWithoutProperties(a,_excluded);return React.createElement(Line,_extends({id:b,name:c,rotation:i,scaleX:e,scaleY:g,stroke:p,strokeWidth:r,shadowOffsetX:s,shadowOffsetY:t,shadowBlur:u,shadowColor:v,shadowOpacity:w,points:l,lineCap:n,tension:x,hitStrokeWidth:20,x:0,y:0,opacity:z},k,A))};export default LineNode;