Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
resolutionfactor=1 when a mask is made
  • Loading branch information
Marijn-321 authored and Marijn-321 committed Jan 19, 2025
1 parent 358c58a commit 0854fb6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion motioneye/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,15 @@ function initUI() {
$('div#networkShareTestButton').on('click', doTestNetworkShare);

/* mask editor buttons */
$('div#motionMaskEditButton, div#privacyMaskEditButton').on('click', function (event) {
$('div#motionMaskEditButton, div#privacyMaskEditButton').on('click', async function (event) {
var cameraId = $('#cameraSelect').val();

if (resolutionFactor !== 1) {
resolutionFactor = 1; //set the resolution dimmer slider to 100% for correct measurement

await new Promise(resolve => setTimeout(resolve, 1000)); // 1 second delay
}

var img = getCameraFrame(cameraId).find('img.camera')[0];
if (!img._naturalWidth || !img._naturalHeight) {
return runAlertDialog(i18n.gettext("Ne eblas redakti la maskon sen valida kameraa bildo!"));
Expand Down

0 comments on commit 0854fb6

Please sign in to comment.