Compare commits

..

No commits in common. "4ef2ee46708f93d95aeeb37204c2352d34d3ad08" and "6ec94b4beb0964a9ee2c95d06d20cff099061af6" have entirely different histories.

6 changed files with 6 additions and 85 deletions

View file

@ -266,9 +266,6 @@ body.debug div:not(.centerLine) {
#notice_recording.visible { #notice_recording.visible {
display: flex; display: flex;
} }
#notice_recording button {
pointer-events: all;
}
#notice_recording.impenetrable { #notice_recording.impenetrable {
pointer-events: all; pointer-events: all;
background-color: rgba(0,0,0,0.5); background-color: rgba(0,0,0,0.5);

View file

@ -46,37 +46,6 @@
.panel>.bottomButtonsContainer { .panel>.bottomButtonsContainer {
order: 3; order: 3;
display: flex;
flex-direction: column;
}
.panel>.bottomButtonsContainer #start_new_project {
order: 1;
margin: 7px 10px 0px 10px;
}
.panel>.bottomButtonsContainer #open_project {
order: 2;
margin: 7px 10px 0px 10px;
}
.panel>.bottomButtonsContainer #save_project {
order: 3;
margin: 7px 10px 0px 10px;
}
.panel>.bottomButtonsContainer #add_font {
order: 4;
margin: 7px 10px 0px 10px;
}
.panel>.bottomButtonsContainer #upload_audio {
order: 5;
margin: 7px 10px 0px 10px;
}
.panel>.bottomButtonsContainer #exporter_open {
order: 6;
margin: 7px 10px 0px 10px;
}
.panel>.bottomButtonsContainer #hide_ui {
order: 7;
margin: 7px 10px;
} }
.panelWrapper {} .panelWrapper {}

View file

@ -173,35 +173,6 @@ const Artboard = function(tp, domElement = false, autoInit = true) {
this.hide = () => { this.hide = () => {
// nothing to do // nothing to do
}; };
const getHierarchyPanelButton = () => {
if (hierarchyPanelButton === null) {
hierarchyPanelButton = tp.shadowRoot.querySelector(`.layerMover${this.id()}`);
}
return hierarchyPanelButton;
};
this.isSelected = () => {
const panel = getHierarchyPanelButton();
if (panel === null) {
return false;
} else {
const notSelected = panel.querySelector('.not-selected');
return !notSelected;
}
};
this.select = () => {
const panel = getHierarchyPanelButton();
const selectables = panel.querySelector('.not-selected');
if (selectables !== null && typeof selectables.dispatchEvent === 'function') {
var clickEvent = new MouseEvent("click", {
"view": window,
"bubbles": true,
"cancelable": false
});
selectables.dispatchEvent(clickEvent);
} else {
window.debugElement = panel;
}
};
// action // action
if (typeof domElement !== 'object') { if (typeof domElement !== 'object') {

View file

@ -44,7 +44,6 @@ const Audio = function(tp, record) {
//}, //},
//}); //});
let started = false; let started = false;
let allowedMicrophone = true; // TODO: actually use this
let mapping = {}; let mapping = {};
let savedMapping = {}; let savedMapping = {};
@ -916,15 +915,7 @@ const Audio = function(tp, record) {
visualize(); visualize();
}) })
.catch(function(err) { .catch(function(err) {
console.log("Audio::init","The following gUM error occured: " + err); console.log("The following gUM error occured: " + err);
const noPermission = err.message.toLowerCase().indexOf('permission') >= 0;
if (noPermission) {
if (allowedMicrophone) {
alert("We don't have permission to access the microphone. Microphone input will be silent.");
}
allowedMicrophone = false;
// TODO: actually use this
}
}); });
} else { } else {
console.log("getUserMedia not supported on your browser!"); console.log("getUserMedia not supported on your browser!");

View file

@ -121,7 +121,10 @@ window.showAbout = () => {
if (getAbout() === null) { if (getAbout() === null) {
return; return;
} }
getAbout().classList.remove("hidden"); getAbout().classList.remove("hidden");
} }
window.hideAbout = () => { window.hideAbout = () => {
if (getAbout() !== null) { if (getAbout() !== null) {
@ -521,19 +524,9 @@ const deleteLayer = (id, saveProject = true) => {
} }
}); });
} }
const wasSelected = layers[index].isSelected();
layers[index].prepareForDepartureFromThisBeautifulExperience(); layers[index].prepareForDepartureFromThisBeautifulExperience();
layers.splice(index, 1); layers.splice(index, 1);
delete layersById[id]; delete layersById[id];
if (wasSelected) {
if (layers.length > index + 1) {
layers[index].select();
} else if (layers.length > 0) {
layers[layers.length - 1].select();
} else {
artboard.select();
}
}
if (saveProject) { if (saveProject) {
setTimeout(() => { setTimeout(() => {
tp.saveProject(); tp.saveProject();

View file

@ -469,9 +469,9 @@ const Record = function(tp) {
document.querySelector('#notice_recording') document.querySelector('#notice_recording')
.classList.add('visible'); .classList.add('visible');
document.querySelector('#notice_recording') document.querySelector('#notice_recording')
.classList.remove('impenetrable'); .classList.remove('imprenetrable');
document.querySelector('#notice_recording .what p').innerHTML = 'recording'; document.querySelector('#notice_recording .what p').innerHTML = 'recording';
document.querySelector('#notice_recording .details p').innerHTML = '<button onclick="record.stopRecording()">stop recording</button>'; document.querySelector('#notice_recording .details p').innerHTML = '';
if (!isInitialized) { if (!isInitialized) {
init(); init();
} }