Fixing quite a few bugs. v0.1.2
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0ce5748900
commit
7912cbd5b9
4 changed files with 6 additions and 6 deletions
|
@ -60,7 +60,7 @@ D.Dialog {
|
||||||
icon: "icons/settings/custom/label.svg"
|
icon: "icons/settings/custom/label.svg"
|
||||||
min: 1
|
min: 1
|
||||||
width: dlgProperties.width
|
width: dlgProperties.width
|
||||||
defValue: objEditor.obj.name
|
value: objEditor.obj.name
|
||||||
onChanged: function(newValue) {
|
onChanged: function(newValue) {
|
||||||
var newName = Utils.parseName(newValue)
|
var newName = Utils.parseName(newValue)
|
||||||
if(newName != '' && objEditor.obj.name != newName) {
|
if(newName != '' && objEditor.obj.name != newName) {
|
||||||
|
|
|
@ -158,7 +158,7 @@ class GainBode extends Common.ExecutableObject {
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
super.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()
|
Objects.currentObjects['Somme gains Bode'][0].recalculateCache()
|
||||||
} else {
|
} else {
|
||||||
Objects.createNewRegisteredObject('Somme gains Bode')
|
Objects.createNewRegisteredObject('Somme gains Bode')
|
||||||
|
|
|
@ -147,7 +147,7 @@ class PhaseBode extends Common.ExecutableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
update() {
|
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()
|
Objects.currentObjects['Somme phases Bode'][0].recalculateCache()
|
||||||
} else {
|
} else {
|
||||||
Objects.createNewRegisteredObject('Somme phases Bode')
|
Objects.createNewRegisteredObject('Somme phases Bode')
|
||||||
|
|
|
@ -83,8 +83,8 @@ class SommeGainsBode extends Common.DrawableObject {
|
||||||
var drawMin = 0.001
|
var drawMin = 0.001
|
||||||
|
|
||||||
var baseY = 0
|
var baseY = 0
|
||||||
var om0xGains = {100000: 0} // To draw the last part
|
var om0xGains = {1000000000: 0} // To draw the last part
|
||||||
var om0xPass = {100000: 'high'} // 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.
|
Objects.currentObjects['Gain Bode'].forEach(function(gainObj) { // Sorting by their om_0 position.
|
||||||
var om0x = gainObj.om_0.x.execute()
|
var om0x = gainObj.om_0.x.execute()
|
||||||
if(om0xGains[om0x] == undefined) {
|
if(om0xGains[om0x] == undefined) {
|
||||||
|
@ -115,7 +115,7 @@ class SommeGainsBode extends Common.DrawableObject {
|
||||||
}
|
}
|
||||||
// Calculating parts
|
// Calculating parts
|
||||||
var previousPallier = drawMin
|
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 dbfn = new MathLib.Expression(`${gainTotal}*(ln(x)-ln(${previousPallier}))/ln(10)+${baseY}`)
|
||||||
var inDrawDom = MathLib.parseDomain(`]${previousPallier};${om0xList[pallier]}]`)
|
var inDrawDom = MathLib.parseDomain(`]${previousPallier};${om0xList[pallier]}]`)
|
||||||
this.cachedParts.push([dbfn, inDrawDom])
|
this.cachedParts.push([dbfn, inDrawDom])
|
||||||
|
|
Loading…
Add table
Reference in a new issue