remove unnecessary logs

This commit is contained in:
themancalledjakob 2024-03-07 11:11:37 +01:00
parent e10d8dbe1d
commit 05c6f3f5f9
2 changed files with 0 additions and 20 deletions

View file

@ -376,13 +376,11 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
};
this.init = (initialValues = false) => {
return new Promise((resolve) => {
console.log('this is happening','layer init');
const promises = [];
promises.push(this.findInjectHierarchyPanelPromise());
const doUpdateTheatre = false;
this.updateFonts(doUpdateTheatre)
.then(() => {
console.log('this is happening','layer init update fonts');
this.theatreObject = tp.addObject(this.id(), this.props, this.onValuesChange);
if (typeof initialValues === 'object') {
this.theatreObject.initialValue = initialValues;
@ -390,19 +388,14 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
window.layerOrder.add(this.id());
setTimeout(() => {
const values = JSON.parse(JSON.stringify(this.theatreObject.value));
console.log('this is happening','doing the transaction');
tp.studio.transaction(({
set
}) => {
set(this.theatreObject.props, values);
});
console.log('this is happening','has have been doing the transaction');
setTimeout(() => {
console.log('this is happening');
promises.push(this.findInjectPanelPromise());
console.log(promises);
Promise.allSettled(promises).then(() => {
console.log('this is happening');
resolve();
if (config.autoSave && window.isInitialized) {
tp.saveProject();
@ -468,7 +461,6 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
}
if (doItAgain) {
hierarchyPanelFinderTimeout = setTimeout(() => {
console.log('hierachrypanelfinder');
this.findInjectHierarchyPanel(resolve);
}, 30);
window.hierarchyPanelFinderTimeout = hierarchyPanelFinderTimeout;
@ -520,19 +512,14 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
let panelFinderTimeout = false;
this.findInjectPanelPromise = () => {
return new Promise((resolve) => {
console.log('this is happening', 'finInjectPanelPRomisE');
this.findInjectPanel(resolve);
});
};
this.findInjectPanel = (resolve = false) => {
if (tp.studio.selection.length === 0 || (tp.studio.selection.length > 0 && tp.studio.selection[0].address.objectKey !== this.id())) {
console.log('this is happening', 'finInjectPanel DOES NOT RESOLVE HAHAHAHA');
if (typeof resolve === 'function') {
console.log('this is happening', 'resolver');
resolve();
}
console.log('this is happening', 'was resolved?');
return;
} else {
const panel = tp.getPanel();

View file

@ -323,20 +323,16 @@ const resize = () => {
};
const postModuleInitialized = () => {
console.log('this is happening');
window.setLoadingTask('setting up animation', 80);
moduleFS.init()
.then(() => {
console.log('this is happening');
artboard = new Artboard(tp, content);
initPanels();
// NOTE: we know that our TheatrePlay is initialized
tp.connectModuleCallbacks();
exporter.init();
getFontsAndAxes();
console.log('this is happening');
tp.loadProject().then(() => {
console.log('this is happening');
interactor.init();
resize();
adjustPanel();
@ -348,7 +344,6 @@ const postModuleInitialized = () => {
tp.saveProject();
}
}, 1000);
console.log('this is happening');
});
//midiController.init();
});
@ -461,9 +456,7 @@ const addExistingLayer = (layerID, values) => {
layer.valuesCorrector(values);
const cppProps = layer.values2cppProps(values);
const checkID = Module.addExistingLayer(cppProps, layerID);
console.log('this is happening');
layer.init().then(() => {
console.log('this is happening');
layers.push(layer);
layersById[layerID] = layer;
resolve(layer);