Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda