From d767997177462b1323a40571fb2234e963e59f8c Mon Sep 17 00:00:00 2001
From: Lucio Zambon <lucio.zambon@elettra.eu>
Date: Thu, 23 Jan 2025 15:37:52 +0000
Subject: [PATCH] Update panther2d.php

---
 panther2d.php | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/panther2d.php b/panther2d.php
index 6a33132..75ab1bc 100644
--- a/panther2d.php
+++ b/panther2d.php
@@ -42,8 +42,9 @@
 			$f = file_get_contents("./panther_conf.js");
 			echo "\n<script>\n".strtr($f, array('export '=>''))."</script>\n";
 			$f = file_get_contents("./components/bundle_{$bundle}2d.svg");
+			$backgroundColor = isset($_REQUEST['backgroundColor']) && $_REQUEST['backgroundColor']=='black'? 'black': '#333';
 			$replace = array('</svg>'=>'    <filter x="0" y="0" width="1" height="1" id="solid">
-      <feFlood flood-color="#333" flood-padding="20" result="bg" />
+      <feFlood flood-color="'.$backgroundColor.'" flood-padding="20" result="bg" />
       <feMerge>
         <feMergeNode in="bg"/>
         <feMergeNode in="SourceGraphic"/>
@@ -60,6 +61,20 @@
 		<div id='notice' style='display:<?php echo $_REQUEST['machine']=='elettra2'? 'block': 'none';?>; position:absolute; right:5px; bottom:5px; max-width:600px; z-index: 10000;'>
 			Data source <a href='https://drive.elettra.eu/group/268/' target="_blank">https://drive.elettra.eu/group/268/</a>
 		</div>
+		<div id='application' style='display:none; position:absolute; left:0; top:0; bottom:0; width:340px; max-width:340px; z-index: 10000;'>
+			<div id='applicationReference' style='display:none;'>
+				<div style='width:100%; padding:5px; color: yellow; margin-top: 3px;'>
+					<table>
+					<tr><td style="valign: middle; width: 33%">Reference</td>
+					<td style="width: 65%"><table><tr><td style="color:red;font-weight: bold;">H</td><td>
+					<button id='hor_set' onClick="myreference('hor_set')" style="width: 4em; margin-left:10px;" title="save actual values as reference in local storage"> Set </button>  
+					<button onClick="myreference('hor_clear')" style="width: 5em;"> Clear </button></td><tr>
+					<tr><td style="color:green;font-weight: bold;">V</td><td><button id='ver_set' onClick="myreference('ver_set')" style="width: 4em; margin-left:10px;" title="save actual values as reference in local storage"> Set </button>  
+					<button onClick="myreference('ver_clear')" style="width: 5em;"> Clear </button></td><tr></table></td><tr></table>
+				</div>
+			</div>
+			<iframe id='applicationFrame' style="border:0; position:absolute; width: 100%; height: 800px;" src='' data-src='https://<?php echo $_SERVER['SERVER_NAME'];?>/knob/tunefb.php'></iframe>
+		</div>
 		<script type="text/javascript" src="./svg-pan-zoom.min.js"></script>
 		<!--script type="text/javascript" src="./svg-pan-zoom-rotate.js"></script-->
 		<script type="text/javascript" src="<?php echo ($local? '../spa/js/hammer.min.js': 'https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js');?>"></script>
-- 
GitLab