mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Merge pull request #2677 from int2001/no_noise
New DXWaterfall Option "Eye Friendly"
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!-- DX Waterfall Component - START -->
|
||||
<?php if ($this->session->userdata('user_dxwaterfall_enable') == 'Y' && isset($manual_mode) && $manual_mode == 0) { ?>
|
||||
<?php if ((($this->session->userdata('user_dxwaterfall_enable') == 'E') || $this->session->userdata('user_dxwaterfall_enable') == 'Y') && isset($manual_mode) && $manual_mode == 0) { ?>
|
||||
<!-- DX Waterfall Component - JS loaded in footer after radiohelpers.js -->
|
||||
<script language="javascript">
|
||||
/*
|
||||
|
||||
@@ -373,7 +373,10 @@ function stopImpersonate_modal() {
|
||||
<?php if ($this->uri->segment(1) == "qso" ) { ?>
|
||||
<!-- Javascript used for QSO Notes Area -->
|
||||
<script src="<?php echo base_url() ;?>assets/plugins/easymde/easymde.min.js"></script>
|
||||
<?php if($this->session->userdata('user_dxwaterfall_enable') == 'Y' && isset($manual_mode) && $manual_mode == 0) { ?>
|
||||
<?php if(($this->session->userdata('user_dxwaterfall_enable') == 'E' || $this->session->userdata('user_dxwaterfall_enable') == 'Y') && isset($manual_mode) && $manual_mode == 0) { ?>
|
||||
<script>
|
||||
var dxwaterfall_enable='<?php echo $this->session->userdata('user_dxwaterfall_enable'); ?>';
|
||||
</script>
|
||||
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/dxwaterfall.js?v=<?php echo floor(time() / 3600); ?>"></script>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
@@ -1435,7 +1438,7 @@ mymap.on('mousemove', onQsoMapMove);
|
||||
|
||||
<!--- CAT Functionality --->
|
||||
<!--- DX Waterfall Functionality --->
|
||||
<?php if ($this->session->userdata('user_dxwaterfall_enable') == 'Y') { ?>
|
||||
<?php if (($this->session->userdata('user_dxwaterfall_enable') == 'Y') || ($this->session->userdata('user_dxwaterfall_enable') == 'E')) { ?>
|
||||
<script>
|
||||
// Global variable definition for dxwaterfall.js
|
||||
var dxwaterfall_cat_state = "none";
|
||||
|
||||
@@ -447,6 +447,7 @@
|
||||
<?php if(!isset($user_dxwaterfall_enable)) { $user_dxwaterfall_enable='N'; }?>
|
||||
<select class="form-select" id="user_dxwaterfall_enable" name="user_dxwaterfall_enable" aria-describedby="user_dxwaterfall_enable_Help" required>
|
||||
<option value='Y' <?php if($user_dxwaterfall_enable == "Y") { echo "selected=\"selected\""; } ?>><?= __("Enabled"); ?></option>
|
||||
<option value='E' <?php if($user_dxwaterfall_enable == "E") { echo "selected=\"selected\""; } ?>><?= __("Enabled").' '.__("squelched"); ?></option>
|
||||
<option value='N' <?php if($user_dxwaterfall_enable == "N") { echo "selected=\"selected\""; } ?>><?= __("Disabled"); ?></option>
|
||||
</select>
|
||||
<small id="user_dxwaterfall_enable_Help" class="form-text text-muted"><?= __("Show an interactive DX Cluster 'Waterfall' on the QSO logging page."); ?></small>
|
||||
|
||||
@@ -3583,6 +3583,7 @@ var dxWaterfall = {
|
||||
|
||||
// Generate and cache static noise patterns for animation
|
||||
generateCachedNoise: function() {
|
||||
if ((dxwaterfall_enable ?? 'Y') === 'E') { return; }
|
||||
var width = this.canvas.width;
|
||||
var height = this.canvas.height;
|
||||
|
||||
@@ -3637,6 +3638,7 @@ var dxWaterfall = {
|
||||
|
||||
// Draw static noise background (cached and animated)
|
||||
drawStaticNoise: function() {
|
||||
if ((dxwaterfall_enable ?? 'Y') === 'E') { return; }
|
||||
try {
|
||||
// Generate cached noise only if needed (dimensions changed or first time)
|
||||
this.generateCachedNoise();
|
||||
|
||||
Reference in New Issue
Block a user