Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

187
Vistas
Paperjs how to prevent multiple buttons canceling a drag event on mouseup / allow paperjs only use left button

If you:

  • mousedown left button ↓
  • mousedown right button ↓
  • mouseup right button ↑

The drag event gets canceled by mouseup right button , I don't want that to happen.
(only want that to happen on mouseup left button , because the event was started by mlb.)

  • I've tried preventDefault(), stopPropagation() on both paper and window event.
  • I've tried emitting mousedown/mousedrag on mouseup tool.emit("mousedown", tool.onMouseDown); not sure if I'm doing something wrong with it, but it runs the mousedown function once and stops, and I don't think it keeps event data from the first mousedown.

Is there any way to prevent this, maybe even preventing Paperjs from accessing the right button entirely if needed?

I know this has been kind and issue for a while now: https://github.com/paperjs/paper.js/issues/1355
yet there is a fix for accessing 1,2,3.. buttons (event as any).event.button,
there is no fix for preventing the dragging to be set to false.

P.S Appreciate for any help!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda