document.getElementById("id_logic_version").innerHTML = "Logic version = 2019.12.06.0";

window.addEventListener("deviceorientation", on_orientation_uab);
window.addEventListener("devicemotion", on_motion_uab);

function desenare(beta, gamma)
{
	var svg = document.getElementById("id_svg");
	var cerc = document.getElementById("id_circle");
		
	var r = cerc.getAttribute("r");
	var svg_height = svg.getAttribute("height");
	var svg_width = svg.getAttribute("width");
	
	var x = svg_width / 2 + beta / 90 * (svg_width / 2 - r);
	var y = svg_height / 2 + gamma / 90 * (svg_height / 2 - r);
	
	cerc.setAttribute("cx", x);
	cerc.setAttribute("cy", y);
}

function on_orientation_uab(e)
{
	desenare(e.beta, e.gamma);
}

function on_motion_uab(e)
{
	var acc = e.accelerationIncludingGravity;
		
	var beta = -Math.atan(acc.y / acc.z) / Math.PI * 180;
	var gamma = Math.atan(acc.x / acc.z) / Math.PI * 180;
		
	//desenare(beta, gamma);
}
@@ -82,18 +82,183 @@
 06.0%22;%0D%0A
-%0D%0A
+document.getElementById(%22id_button%22).addEventListener(%22click%22, on_cere_permisiuni);%0D%0A%0D%0Aif (typeof(DeviceOrientationEvent.requestPermission) == %22function%22)%7B%0D%0A%7D%0D%0Aelse%0D%0A%09
 window.a
@@ -316,16 +316,18 @@
 _uab);%0D%0A
+%0D%0A
 window.a
@@ -373,24 +373,355 @@
 on_uab);%0D%0A%0D%0A
+function f_ok(p)%0D%0A%7B%0D%0A%09if (p == %22granted%22)%0D%0A%09%09window.addEventListener(%22deviceorientation%22, on_orientation_uab);%0D%0A%09else%0D%0A%09%09alert(%22Permisiune respinsa%22);%0D%0A%7D%0D%0A%0D%0Afunction f_not_ok(p)%0D%0A%7B%0D%0A%09alert(%22Promisiune respinsa%22);%0D%0A%7D%0D%0A%0D%0Afunction on_cere_permisiuni()%0D%0A%7B%0D%0A%09DeviceOrientationEvent.requestPermission().then(f_ok).catch(f_not_ok);%0D%0A%7D%0D%0A%0D%0A
 function des
@@ -1446,16 +1446,18 @@
 beta, gamma);%0D%0A%7D
+%0D%0A

Update svg.js