mirror of
https://github.com/dualshock-tools/dualshock-tools.github.io.git
synced 2026-03-01 11:19:54 +03:00
Be smarter when resetting circularity data in finetune modal
This commit is contained in:
committed by
dualshock-tools
parent
bc7a8942b0
commit
3ab97fb10f
@@ -487,9 +487,9 @@ function collectCircularityData(stickStates, leftData, rightData) {
|
||||
}
|
||||
}
|
||||
|
||||
function clear_circularity() {
|
||||
ll_data.fill(0);
|
||||
rr_data.fill(0);
|
||||
function clear_circularity(leftOrRight = 'both') {
|
||||
if(['left', 'both'].includes(leftOrRight)) ll_data.fill(0);
|
||||
if(['right', 'both'].includes(leftOrRight)) rr_data.fill(0);
|
||||
}
|
||||
|
||||
function reset_circularity_mode() {
|
||||
|
||||
@@ -996,14 +996,6 @@ export class Finetune {
|
||||
this._updateStepSizeUI();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset circularity sliders to zero position
|
||||
*/
|
||||
_resetCircularitySliders() {
|
||||
$(`#leftCircularitySlider`).val(0);
|
||||
$(`#rightCircularitySlider`).val(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the start of circularity slider adjustment
|
||||
* Store base values and reset previous slider value
|
||||
@@ -1112,7 +1104,7 @@ export class Finetune {
|
||||
circData.fill(0);
|
||||
|
||||
// Call the clearCircularity function to update the display
|
||||
this.clearCircularity();
|
||||
this.clearCircularity(lOrR);
|
||||
|
||||
// Trigger the change event to update the finetune data once when slider is released
|
||||
this._onFinetuneChange();
|
||||
@@ -1170,7 +1162,7 @@ export class Finetune {
|
||||
this._showErrorSlackButton(lOrR);
|
||||
|
||||
// Clear the circularity data display
|
||||
this.clearCircularity();
|
||||
this.clearCircularity(lOrR);
|
||||
|
||||
// Trigger the change event to update the finetune data
|
||||
this._onFinetuneChange();
|
||||
|
||||
Reference in New Issue
Block a user