Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
Arrastre y mueva los controles JS de fabric

¿Quién puede ayudarme un poco con la función de mover/arrastrar de JS Fabric? Quiero que la función de arrastrar/mover se active en la esquina superior izquierda y probé el siguiente código:

 //drag function const dragOriginal = fabric.Object.prototype.controls.tl; fabric.Object.prototype.controls.moveObject = new fabric.Control({ x: -0.5, y: -0.5, actionHandler: dragOriginal, actionName: 'drag', cursorStyle:'pointer', render: renderIcon, cornerSize: 25 });

Esto me da el siguiente error en la consola

 actionHandler is not a function. (In 'actionHandler(e, transform, x, y)', 'actionHandler' is an instance of Object)

¿Quién puede ayudarme con esto?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

creo que esta es la respuesta

 fabric.Object.prototype.controls.moveObject = new fabric.Control({ x: -0.5, y: -0.5, actionHandler: fabric.controlsUtils.dragHandler,//change to this actionName: 'drag', cursorStyle:'pointer', render: renderIcon, cornerSize: 25 });

Espero que esto sea lo que estabas buscando.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!