You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Application-Web/outputs/public/front/components/actions/ArrowAction.tsx-b082b6c9.js

3 lines
1.4 KiB

(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".arrow-action{height:50%}.arrow-action-icon{user-select:none;-moz-user-select:none;max-width:17px;max-height:17px}.arrow-head-pick{position:absolute;cursor:grab;top:0;left:0;min-width:17px;min-height:17px}.arrow-head-pick:active{cursor:crosshair}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{r as s,j as o}from"../../../jsx-runtime-2e2d9038.js";import{D as i}from"../../../cjs-ff7eb0e1.js";import"../../../index-ca121481.js";const c="/IQBall/public/arrow-73d7c199.svg";function g({onHeadDropped:t,onHeadPicked:e,onHeadMoved:a}){const r=s.useRef(null);return o.jsxs("div",{className:"arrow-action",children:[o.jsx("img",{className:"arrow-action-icon",src:c,alt:"add arrow"}),o.jsx(i,{nodeRef:r,onStart:()=>{const n=r.current.getBoundingClientRect();e(n)},onStop:()=>{const n=r.current.getBoundingClientRect();t(n)},onDrag:()=>{const n=r.current.getBoundingClientRect();a(n)},position:{x:0,y:0},children:o.jsx("div",{ref:r,className:"arrow-head-pick"})})]})}function x(){return o.jsx("div",{style:{backgroundColor:"black",height:"5px",width:"25px"}})}function p(){return o.jsx("svg",{viewBox:"0 0 50 50",width:20,height:20,children:o.jsx("polygon",{points:"50 0, 0 0, 25 40",fill:"#000"})})}export{p as MoveToHead,x as ScreenHead,g as default};