Explorar el Código

Fix rulers causing errors when their entity is deleted

master
Fen Dweller hace 3 años
padre
commit
dcfd494355
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. +10
    -0
      macrovision.js

+ 10
- 0
macrovision.js Ver fichero

@@ -980,7 +980,17 @@ function updateSizes(dirtyOnly = false) {
drawRulers();
}

function cleanRulers() {
rulers = rulers.filter(ruler => {
if (!ruler.entityKey) {
return true;
} else {
return entities[ruler.entityKey] !== undefined;
}
});
}
function drawRulers() {
cleanRulers();
const canvas = document.querySelector("#rulers");

/** @type {CanvasRenderingContext2D} */


Cargando…
Cancelar
Guardar