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

197
Vistas
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 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