From ab3786ef23270e253c1626857a4b29bce5069492 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Tue, 24 Oct 2023 07:41:44 +0200 Subject: [PATCH] recordbutton can be disabled --- bin/web/js/config.js | 1 + bin/web/js/layer.js | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/web/js/config.js b/bin/web/js/config.js index 62fd178..e1c1d90 100644 --- a/bin/web/js/config.js +++ b/bin/web/js/config.js @@ -115,6 +115,7 @@ const config = { rolloverResetLoop: true, }, record: { + active: false, ignoreProps: { artboard: ['x', 'y', 'zoom', 'pixelDensity', 'width', 'height'], layer: ['transformOrigin', 'fontFamily', 'text', 'mirror_x', 'mirror_y', 'mirror_xy'], diff --git a/bin/web/js/layer.js b/bin/web/js/layer.js index 7068789..c30fee3 100644 --- a/bin/web/js/layer.js +++ b/bin/web/js/layer.js @@ -806,10 +806,12 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) { console.log('Layer::findInjectPanel', `cannot inject audio panel for ${this.id()} for some reason.`); } // should we have a record object, let's inject the buttons, etc - if (typeof record === 'object' && record.hasOwnProperty('injectPanel')) { - record.injectPanel(this); - } else { - console.log('Layer::findInjectPanel', `cannot inject record panel for ${this.id()} for some reason.`); + if (config.record.active) { + if (typeof record === 'object' && record.hasOwnProperty('injectPanel')) { + record.injectPanel(this); + } else { + console.log('Layer::findInjectPanel', `cannot inject record panel for ${this.id()} for some reason.`); + } } injectedPanel = true;