Fixing quite a few bugs. v0.1.2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ad5001 2021-09-30 20:36:05 +02:00
parent 0ce5748900
commit 7912cbd5b9
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
4 changed files with 6 additions and 6 deletions

View file

@ -60,7 +60,7 @@ D.Dialog {
icon: "icons/settings/custom/label.svg"
min: 1
width: dlgProperties.width
defValue: objEditor.obj.name
value: objEditor.obj.name
onChanged: function(newValue) {
var newName = Utils.parseName(newValue)
if(newName != '' && objEditor.obj.name != newName) {

View file

@ -158,7 +158,7 @@ class GainBode extends Common.ExecutableObject {
update() {
super.update()
if(Objects.currentObjects['Somme gains Bode'] != undefined) {
if(Objects.currentObjects['Somme gains Bode'] != undefined && Objects.currentObjects['Somme gains Bode'].length > 0) {
Objects.currentObjects['Somme gains Bode'][0].recalculateCache()
} else {
Objects.createNewRegisteredObject('Somme gains Bode')

View file

@ -147,7 +147,7 @@ class PhaseBode extends Common.ExecutableObject {
}
update() {
if(Objects.currentObjects['Somme phases Bode'] != undefined) {
if(Objects.currentObjects['Somme phases Bode'] != undefined && Objects.currentObjects['Somme phases Bode'].length > 0) {
Objects.currentObjects['Somme phases Bode'][0].recalculateCache()
} else {
Objects.createNewRegisteredObject('Somme phases Bode')

View file

@ -83,8 +83,8 @@ class SommeGainsBode extends Common.DrawableObject {
var drawMin = 0.001
var baseY = 0
var om0xGains = {100000: 0} // To draw the last part
var om0xPass = {100000: 'high'} // To draw the last part
var om0xGains = {1000000000: 0} // To draw the last part
var om0xPass = {1000000000: 'high'} // To draw the last part
Objects.currentObjects['Gain Bode'].forEach(function(gainObj) { // Sorting by their om_0 position.
var om0x = gainObj.om_0.x.execute()
if(om0xGains[om0x] == undefined) {
@ -115,7 +115,7 @@ class SommeGainsBode extends Common.DrawableObject {
}
// Calculating parts
var previousPallier = drawMin
for(var pallier = 0; pallier <= om0xList.length; pallier++) {
for(var pallier = 0; pallier < om0xList.length; pallier++) {
var dbfn = new MathLib.Expression(`${gainTotal}*(ln(x)-ln(${previousPallier}))/ln(10)+${baseY}`)
var inDrawDom = MathLib.parseDomain(`]${previousPallier};${om0xList[pallier]}]`)
this.cachedParts.push([dbfn, inDrawDom])