mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 13:36:54 +03:00
@@ -232,9 +232,10 @@
|
||||
ROIInfo,
|
||||
cofcat,
|
||||
param,
|
||||
enhanceCon = false;
|
||||
lockAspectRatio = true;
|
||||
lockSizes = false;
|
||||
_roialt = "ana",
|
||||
enhanceCon = false,
|
||||
lockAspectRatio = true,
|
||||
lockSizes = false,
|
||||
domainname = getDomainname();
|
||||
|
||||
function doReboot() {
|
||||
@@ -306,9 +307,16 @@ function newROI() {
|
||||
var sel = document.getElementById("Numbers_value1");
|
||||
var _number= sel.options[sel.selectedIndex].text;
|
||||
sel = document.getElementById("index");
|
||||
var _roialt= sel.options[sel.selectedIndex].text;
|
||||
|
||||
if (ROIInfo.length > 0) {
|
||||
_roialt = sel.options[sel.selectedIndex].text;
|
||||
}
|
||||
else {
|
||||
_roialt = "ana";
|
||||
}
|
||||
|
||||
var _roinew = prompt("Please enter a name for the new ROI", "name");
|
||||
var _roinew = prompt("Please enter a name for the new ROI", _roialt);
|
||||
|
||||
if (_roinew === null) {
|
||||
return; //break out of the function early because prompt was aborted
|
||||
}
|
||||
@@ -715,8 +723,6 @@ function drawTextBG(context, txt, x, y, padding) {
|
||||
if (typeof ROIInfo === 'undefined') { // During init, ROIInfo is not defined yet
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var canvas = document.getElementById('canvas');
|
||||
var context = canvas.getContext('2d');
|
||||
@@ -813,18 +819,6 @@ function drawTextBG(context, txt, x, y, padding) {
|
||||
}
|
||||
}
|
||||
|
||||
function getCoords(elem) { // crossbrowser version
|
||||
var box = elem.getBoundingClientRect();
|
||||
var body = document.body;
|
||||
var docEl = document.documentElement;
|
||||
var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
|
||||
var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
|
||||
var clientTop = docEl.clientTop || body.clientTop || 0;
|
||||
var clientLeft = docEl.clientLeft || body.clientLeft || 0;
|
||||
var top = box.top + scrollTop - clientTop;
|
||||
var left = box.left + scrollLeft - clientLeft;
|
||||
return { top: Math.round(top), left: Math.round(left) };
|
||||
}
|
||||
|
||||
function mouseDown(e) {
|
||||
zw = getCoords(this)
|
||||
@@ -924,7 +918,7 @@ function drawTextBG(context, txt, x, y, padding) {
|
||||
var sel = document.getElementById("Numbers_value1");
|
||||
var _number= sel.options[sel.selectedIndex].text;
|
||||
sel = document.getElementById("index");
|
||||
var _roialt= sel.options[sel.selectedIndex].text;
|
||||
_roialt= sel.options[sel.selectedIndex].text;
|
||||
|
||||
var _roinew = prompt("Please enter a new name for the selected ROI", _roialt);
|
||||
if (_roinew === null) {
|
||||
|
||||
Reference in New Issue
Block a user