Remove some console.logs

This commit is contained in:
Tamius Han 2024-12-28 00:42:40 +01:00
parent e54deeb4f7
commit fd9fbc32a8
9 changed files with 5 additions and 28 deletions

View File

@ -5,7 +5,7 @@
v-if="!triggerZoneEditorVisible" v-if="!triggerZoneEditorVisible"
> >
<div <div
class="spawn-container uw-ui-trigger debug-2" class="spawn-container uw-ui-trigger"
:style="triggerZoneStyles" :style="triggerZoneStyles"
> >
&nbsp; &nbsp;
@ -169,7 +169,7 @@
<div <div
v-if="triggerZoneEditorVisible" v-if="triggerZoneEditorVisible"
class="context-spawn uw-ui-area" class="context-spawn uw-ui-area"
style="z-index: 1000; border: 2px dashed red; overflow: hidden;" style="z-index: 1000;"
> >
<TriggerZoneEditor <TriggerZoneEditor
:settings="settings" :settings="settings"
@ -335,7 +335,6 @@ export default {
this.statusFlags.aardErrors = data.aardErrors; this.statusFlags.aardErrors = data.aardErrors;
break; break;
case 'player-dimensions': case 'player-dimensions':
console.log('player dimensions response received.', data);
this.playerDimensionsUpdate(data.data); this.playerDimensionsUpdate(data.data);
break; break;
} }
@ -451,7 +450,6 @@ export default {
* Handles trigger zone * Handles trigger zone
*/ */
handleTriggerZone(mouseInside) { handleTriggerZone(mouseInside) {
console.log('handing trigger zone!', mouseInside);
// this.triggerZoneActive = mouseInside; // this.triggerZoneActive = mouseInside;
}, },

View File

@ -268,7 +268,6 @@ export default {
} }
}, },
siteDefaultCrop() { siteDefaultCrop() {
// console.log('Getting default site crop:', this.siteSettings.raw?.defaults?.crop ? 'yay' : '{useDefault}', this.siteSettings.raw?.defaults?.crop)
return this.siteSettings.raw?.defaults?.crop ? JSON.stringify(this.siteSettings.raw?.defaults?.crop) : JSON.stringify({useDefault: true}); return this.siteSettings.raw?.defaults?.crop ? JSON.stringify(this.siteSettings.raw?.defaults?.crop) : JSON.stringify({useDefault: true});
}, },
siteDefaultStretch() { siteDefaultStretch() {
@ -402,7 +401,6 @@ export default {
commandArguments = undefined; commandArguments = undefined;
} }
// console.log('setting option', option, 'to cmd:', commandArguments, 'event data in:', value);
await this.siteSettings.set(option, commandArguments); await this.siteSettings.set(option, commandArguments);
this.$nextTick( () => this.$forceUpdate() ); this.$nextTick( () => this.$forceUpdate() );
}, },

View File

@ -43,7 +43,6 @@ export default {
}, },
methods: { methods: {
showContextMenu() { showContextMenu() {
console.log('will show context menu.')
this.contextMenuVisible = true; this.contextMenuVisible = true;
}, },
hideContextMenu() { hideContextMenu() {

View File

@ -210,8 +210,6 @@ export default {
y: event.clientY y: event.clientY
}; };
this.dragStartConfiguration = JSON.parse(JSON.stringify(this.settings.active.ui.inPlayer.triggerZoneDimensions)); this.dragStartConfiguration = JSON.parse(JSON.stringify(this.settings.active.ui.inPlayer.triggerZoneDimensions));
console.log(`Mousedown on ${corner}`);
}, },
handleMouseUp(event) { handleMouseUp(event) {
if (!this.activeCornerDrag) { if (!this.activeCornerDrag) {
@ -305,7 +303,6 @@ export default {
return value.replaceAll(',', '.').split('.', 2).join('.').replace(/[^0-9.\-]/g, ''); return value.replaceAll(',', '.').split('.', 2).join('.').replace(/[^0-9.\-]/g, '');
}, },
setTriggerZoneSize(key, value, instantUpdate) { setTriggerZoneSize(key, value, instantUpdate) {
console.log('setting trigger zone size:', key, value);
let size = (+this.forceNumber(value) / 100); let size = (+this.forceNumber(value) / 100);
if (isNaN(+size)) { if (isNaN(+size)) {

View File

@ -287,7 +287,6 @@ export default {
const observer = new IntersectionObserver( const observer = new IntersectionObserver(
([e]) => { ([e]) => {
// console.log('observer triggered. intersection ratio?', e.intersectionRatio)
saveButton.classList.toggle('floating', e.intersectionRatio < 0.95); saveButton.classList.toggle('floating', e.intersectionRatio < 0.95);
}, },
{threshold: [0, 0.5, 0.9, 0.95, 1]} {threshold: [0, 0.5, 0.9, 0.95, 1]}

View File

@ -33,25 +33,18 @@ export default {
if (!dimensions.width || !dimensions.height) { if (!dimensions.width || !dimensions.height) {
this.playerDimensions = undefined; this.playerDimensions = undefined;
} }
console.log('player dimensions update received:', dimensions);
if (dimensions?.width !== this.playerDimensions?.width || dimensions?.height !== this.playerDimensions?.height) { if (dimensions?.width !== this.playerDimensions?.width || dimensions?.height !== this.playerDimensions?.height) {
console.log('Player dimensions changed!', dimensions);
this.playerDimensions = dimensions; this.playerDimensions = dimensions;
this.updateTriggerZones(); this.updateTriggerZones();
} }
}, },
updateTriggerZones() { updateTriggerZones() {
console.log('triggered zone style recheck. player dims:', this.playerDimensions, 'in player settings:', this.settings.active.ui);
if (this.playerDimensions && this.settings) { if (this.playerDimensions && this.settings) {
this.triggerZoneStyles = { this.triggerZoneStyles = {
width: `${Math.round(this.playerDimensions.width * this.settings.active.ui.inPlayer.triggerZoneDimensions.width)}px`, width: `${Math.round(this.playerDimensions.width * this.settings.active.ui.inPlayer.triggerZoneDimensions.width)}px`,
height: `${Math.round(this.playerDimensions.height * this.settings.active.ui.inPlayer.triggerZoneDimensions.height)}px`, height: `${Math.round(this.playerDimensions.height * this.settings.active.ui.inPlayer.triggerZoneDimensions.height)}px`,
transform: `translate(${(this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetX)}%, ${this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetY}%)`, transform: `translate(${(this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetX)}%, ${this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetY}%)`,
}; };
console.log(
'player trigger zone css:', this.triggerZoneStyles
);
} }
}, },
@ -113,7 +106,6 @@ export default {
); );
} }
} else { } else {
// console.log('[UI] hiding UI because conditions were not met. canShowUI:', eventData.canShowUI, 'isOverTriggerZone', isOverTriggerZone);
// this.uwTriggerZoneVisible = false; // this.uwTriggerZoneVisible = false;
} }

View File

@ -24,7 +24,6 @@ export class FallbackCanvas extends GlCanvas {
protected initWebgl() { } protected initWebgl() { }
drawVideoFrame(video: HTMLVideoElement) { drawVideoFrame(video: HTMLVideoElement) {
console.log('context:', this.context, 'canvas:', this.canvas );
this.context.drawImage(video, this.context.canvas.width, this.context.canvas.height); this.context.drawImage(video, this.context.canvas.width, this.context.canvas.height);
} }

View File

@ -122,11 +122,8 @@ export class SiteSettings {
this.compileSettingsObject(); this.compileSettingsObject();
console.log('changes:', parsedSettings);
// trigger any subscriptions on change // trigger any subscriptions on change
if (parsedSettings._updateFlags) { if (parsedSettings._updateFlags) {
console.log('update flags yay!')
if (parsedSettings._updateFlags?.forSite === this.site) { if (parsedSettings._updateFlags?.forSite === this.site) {
if (parsedSettings._updateFlags?.requireReload === true) { if (parsedSettings._updateFlags?.requireReload === true) {
for (const key in this.storageChangeSubscriptions) { for (const key in this.storageChangeSubscriptions) {
@ -140,9 +137,9 @@ export class SiteSettings {
} }
else if (parsedSettings._updateFlags?.requireReload) { else if (parsedSettings._updateFlags?.requireReload) {
for (const key of parsedSettings._updateFlags?.requireReload) { for (const key of parsedSettings._updateFlags?.requireReload) {
console.log('reload required for:', key, this.storageChangeSubscriptions); if (! this.storageChangeSubscriptions[key]) {
continue;
if (! this.storageChangeSubscriptions[key]) continue; }
for (const fn of this.storageChangeSubscriptions[key]) { for (const fn of this.storageChangeSubscriptions[key]) {
fn(this, changes, area); fn(this, changes, area);

View File

@ -99,8 +99,6 @@ class PlayerData {
}], }],
'get-player-dimensions': [{ 'get-player-dimensions': [{
function: () => { function: () => {
console.log('received get player dimensions! -- returning:', this.dimensions)
this.eventBus.send('uw-config-broadcast', { this.eventBus.send('uw-config-broadcast', {
type: 'player-dimensions', type: 'player-dimensions',
data: this.dimensions data: this.dimensions