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

202
Visualizações
Fabric.js: Deactivate all canvas events

I have an issue with deactivating all canvas events in fabric.js. I have in my application two ways where the canvas-data come from. The first way is directly through the localStorage and the other way is through a GET-Request to the Server.

At the first way the function which deactivate the canvas events is working. But on the second way not. I haven't a clue why it is so.

The Canvas-Data from both ways are the same. I can't find any difference.

This is my Function to deactivate the canvas-events:

function deactivateCanvasEvents(canvas){
    canvas.forEachObject(object => {
        object.selectable = false;
        object.evented = false;
    });
}

I've debugged it already and have seen that on the second way the function forEachObject doesn't get executed and no objects existing although the objects are on the canvas.

Have anyone an idea how i can solve it?

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