diff --git a/LogarithmPlotter/i18n/lp_de.ts b/LogarithmPlotter/i18n/lp_de.ts
index 6a90d67..ff300e6 100644
--- a/LogarithmPlotter/i18n/lp_de.ts
+++ b/LogarithmPlotter/i18n/lp_de.ts
@@ -103,52 +103,52 @@
LaTeX-Rendering aktivieren
-
+
&Hilfe
-
+
&Quellcode
-
+
Fehler &Melden
-
+
&Benutzerhandbuch
-
+
&Changelog
-
+
&Hilfe beim Übersetzen!
-
+
&Danksagungen
-
+
&Übrigens
-
+
Änderungen speichern?
-
+
Diese Grafik enthält ungespeicherte Änderungen. Dadurch gehen alle ungespeicherten Daten verloren. Fortfahren?
@@ -346,62 +346,62 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen"
LogarithmPlotter
-
+
Objekte
-
+
Einstellungen
-
+
Verlauf
-
+
Gespeicherte Grafik auf '%1'.
-
+
Laden der Datei '%1'.
-
+
Unbekannter Objekttyp: %1.
-
+
Ungültige Datei angegeben.
-
+
Die Datei konnte nicht gespeichert werden:
-
+
Geladene Datei '%1'.
-
+
Grafik in die Zwischenablage kopiert!
-
+
&Aktualisieren
-
+
LogarithmPlotter &aktualisieren
@@ -478,12 +478,12 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen"
PickLocationOverlay
-
+
Genauigkeit des Zeigers:
-
+
Am Gitter einrasten
@@ -1190,6 +1190,19 @@ Bitte vergewissern Sie sich, dass Ihre LaTeX-Installation korrekt ist, und melde
Punkte
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/i18n/lp_en.ts b/LogarithmPlotter/i18n/lp_en.ts
index 36f7cca..d51714e 100644
--- a/LogarithmPlotter/i18n/lp_en.ts
+++ b/LogarithmPlotter/i18n/lp_en.ts
@@ -103,52 +103,52 @@
Enable LaTeX rendering
-
+
&Help
-
+
&Source code
-
+
&Report a bug
-
+
&User manual
-
+
&Changelog
-
+
&Help translating!
-
+
&Thanks
-
+
&About
-
+
Save unsaved changes?
-
+
This plot contains unsaved changes. By doing this, all unsaved data will be lost. Continue?
@@ -346,62 +346,62 @@ These settings can be changed at any time from the "Settings" menu.
LogarithmPlotter
-
+
Objects
-
+
Settings
-
+
History
-
+
Saved plot to '%1'.
-
+
Loading file '%1'.
-
+
Unknown object type: %1.
-
+
Invalid file provided.
-
+
Could not save file:
-
+
Loaded file '%1'.
-
+
Copied plot screenshot to clipboard!
-
+
&Update
-
+
&Update LogarithmPlotter
@@ -478,12 +478,12 @@ These settings can be changed at any time from the "Settings" menu.
PickLocationOverlay
-
+
Pointer precision:
-
+
Snap to grid
@@ -1190,6 +1190,19 @@ Please make sure your LaTeX installation is correct and report a bug if so.Points
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/i18n/lp_es.ts b/LogarithmPlotter/i18n/lp_es.ts
index 0842196..dfaf15b 100644
--- a/LogarithmPlotter/i18n/lp_es.ts
+++ b/LogarithmPlotter/i18n/lp_es.ts
@@ -103,52 +103,52 @@
Activar el renderizado de LaTeX
-
+
&Ayuda
-
+
&Código fuente
-
+
&Informar de un error
-
+
&Manual del usuario
-
+
&Registro de cambios
-
+
&¡Ayuda a la traducción!
-
+
&Agradecimientos
-
+
&Acerca de
-
+
¿Guardar los cambios no guardados?
-
+
@@ -314,62 +314,62 @@ These settings can be changed at any time from the "Settings" menu.
LogarithmPlotter
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -426,12 +426,12 @@ These settings can be changed at any time from the "Settings" menu.
PickLocationOverlay
-
+
-
+
@@ -1099,6 +1099,19 @@ Please make sure your latex installation is correct and report a bug if so.
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/i18n/lp_fr.ts b/LogarithmPlotter/i18n/lp_fr.ts
index 63cabca..034e753 100644
--- a/LogarithmPlotter/i18n/lp_fr.ts
+++ b/LogarithmPlotter/i18n/lp_fr.ts
@@ -104,52 +104,52 @@
Activer le rendu LaTeX
-
+
&Aide
-
+
&Code source
-
+
&Rapport de bug
-
+
Manuel d'&utilisation
-
+
&Historique des modifications
-
+
&Aider à la traduction !
-
+
&Remerciements
-
+
&À propos
-
+
Sauvegarder les modifications ?
-
+
Ce graphe contient des modifications non sauvegardées. En faisant cela, toutes les données non sauvegardées seront perdues. Continuer ?
@@ -354,62 +354,62 @@ These settings can always be changed at any time from the "Settings" m
LogarithmPlotter
-
+
Objets
-
+
Paramètres
-
+
Historique
-
+
Graphe sauvegardé dans '%1'.
-
+
Chargement du fichier '%1'.
-
+
Type d'objet inconnu : %1.
-
+
Fichier fourni invalide.
-
+
Impossible de sauvegarder le fichier :
-
+
Fichier '%1' chargé.
-
+
Image du graphe copiée dans le presse-papiers !
-
+
&Mise à jour
-
+
&Mettre à jour LogarithmPlotter
@@ -486,12 +486,12 @@ These settings can always be changed at any time from the "Settings" m
PickLocationOverlay
-
+
Précision du pointeur :
-
+
Placement sur la grille
@@ -1199,6 +1199,19 @@ Vérifiez que votre installation de LaTeX est correcte et signalez un bogue si c
Points
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/i18n/lp_hu.ts b/LogarithmPlotter/i18n/lp_hu.ts
index 124f1ac..a2c2163 100644
--- a/LogarithmPlotter/i18n/lp_hu.ts
+++ b/LogarithmPlotter/i18n/lp_hu.ts
@@ -103,52 +103,52 @@
LaTeX-megjelenítés engedélyezése
-
+
&Súgó
-
+
&Forráskód
-
+
&Hiba bejelentése
-
+
&Használati utasítás
-
+
&Változásnapló
-
+
&Segítség a fordításban!
-
+
&Köszönjük
-
+
&Névjegy
-
+
Menti a változtatásokat?
-
+
Ez az ábra nem mentett változtatásokat tartalmaz. Ezzel az összes nem mentett adat elveszik. Folytatja?
@@ -346,62 +346,62 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben.
LogarithmPlotter
-
+
Tárgyak
-
+
Beállítások
-
+
Előzmények
-
+
Ábra mentve ide: „%1”.
-
+
A(z) „%1” fájl betöltése folyamatban van.
-
+
Ismeretlen objektumtípus: %1.
-
+
A megadott fájl érvénytelen.
-
+
A fájl mentése nem sikerült:
-
+
A(z) „%1” fájl betöltve.
-
+
Ábra képernyőkép vágólapra másolva!
-
+
&Frissítés
-
+
A LogarithmPlotter &frissítése
@@ -478,12 +478,12 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben.
PickLocationOverlay
-
+
Mutató pontossága:
-
+
Rácshoz illesztés
@@ -1183,6 +1183,19 @@ Kérjük, ellenőrizze, hogy a LaTeX telepítése helyes-e, és ha igen, jelents
Pontok
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/i18n/lp_nb_NO.ts b/LogarithmPlotter/i18n/lp_nb_NO.ts
index f604460..dfdfd34 100644
--- a/LogarithmPlotter/i18n/lp_nb_NO.ts
+++ b/LogarithmPlotter/i18n/lp_nb_NO.ts
@@ -103,52 +103,52 @@
-
+
&Hjelp
-
+
-
+
-
+
-
+
-
+
-
+
-
+
&Om
-
+
-
+
@@ -346,62 +346,62 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.
LogarithmPlotter
-
+
Objekter
-
+
Innstillinger
-
+
Historikk
-
+
Lagret plott i «%1».
-
+
Laster inn «%1»-fil.
-
+
Ukjent objekttype: %1.
-
+
Ugyldig fil angitt.
-
+
Kunne ikke lagre fil:
-
+
Lastet inn filen «%1».
-
+
Kopierte plott-skjermavbildning til utklippstavlen!
-
+
&Oppdater
-
+
&Installer ny versjon av LogartimePlotter
@@ -478,12 +478,12 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.
PickLocationOverlay
-
+
Peker-presisjon:
-
+
Fest til rutenett
@@ -1174,6 +1174,19 @@ Please make sure your latex installation is correct and report a bug if so.Punkter
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/i18n/lp_template.ts b/LogarithmPlotter/i18n/lp_template.ts
index a22d858..f525586 100644
--- a/LogarithmPlotter/i18n/lp_template.ts
+++ b/LogarithmPlotter/i18n/lp_template.ts
@@ -103,52 +103,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -314,62 +314,62 @@ These settings can be changed at any time from the "Settings" menu.
LogarithmPlotter
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -426,12 +426,12 @@ These settings can be changed at any time from the "Settings" menu.
PickLocationOverlay
-
+
-
+
@@ -1099,6 +1099,19 @@ Please make sure your latex installation is correct and report a bug if so.
+
+ position
+
+
+
+
+
+
+
+
+
+
+
prop
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml
index 31d9b7b..48cf383 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml
@@ -22,7 +22,7 @@ import QtQuick.Dialogs 1.3
import eu.ad5001.MixedMenu 1.1
import "js/objects.js" as Objects
import "js/historylib.js" as HistoryLib
-import "js/math/latex.js" as Latex
+import "js/math/latex.js" as LatexJS
/*!
@@ -143,18 +143,16 @@ MenuBar {
}
Action {
- id: enableLatexSetting
+ id: enableLatexJSSetting
text: qsTr("Enable LaTeX rendering")
checkable: true
checked: Helper.getSettingBool("enable_latex")
onTriggered: {
Helper.setSettingBool("enable_latex", checked)
- Latex.enabled = checked
+ LatexJS.enabled = checked
drawCanvas.requestPaint()
}
icon.name: 'Expression'
-
- Component.onCompleted: Latex.enabled = checked
}
}
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml
index 445c03c..0c71421 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml
@@ -25,6 +25,7 @@ import QtQuick 2.12
import "js/objs/autoload.js" as ALObjects
import "js/objects.js" as Objects
+import "js/math/latex.js" as LatexJS
import eu.ad5001.LogarithmPlotter.History 1.0
import eu.ad5001.LogarithmPlotter.ObjectLists 1.0
import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup
@@ -44,7 +45,16 @@ ApplicationWindow {
color: sysPalette.window
title: "LogarithmPlotter " + (settings.saveFilename != "" ? " - " + settings.saveFilename.split('/').pop() : "") + (history.saved ? "" : "*")
- SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active }
+ SystemPalette {
+ id: sysPalette; colorGroup: SystemPalette.Active
+
+ Component.onCompleted: {
+ // LatexJS initialization.
+ LatexJS.enabled = Helper.getSettingBool("enable_latex")
+ LatexJS.Renderer = Latex
+ LatexJS.defaultColor = sysPalette.windowText
+ }
+ }
SystemPalette { id: sysPaletteIn; colorGroup: SystemPalette.Disabled }
menuBar: appMenu.trueItem
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml
index 8ef80d6..7e59fd5 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml
@@ -92,34 +92,29 @@ Item {
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: {
if(mouse.button == Qt.LeftButton) { // Validate
- if(parent.pickX) {
- let newValue = picked.mouseX.toString()
- newValue = {
- 'Expression': () => new MathLib.Expression(newValue),
- 'number': () => parseFloat(newValue)
- }[Objects.types[objType].properties()[propertyX]]()
- let obj = Objects.currentObjectsByName[objName] // getObjectByName(objName, objType)
- history.addToHistory(new HistoryLib.EditedProperty(
- objName, objType, propertyX, obj[propertyX], newValue
+ let newValueX = !parent.pickX ? null : parseValue(picked.mouseX.toString(), objType, propertyX)
+ let newValueY = !parent.pickY ? null : parseValue(picked.mouseY.toString(), objType, propertyY)
+ let obj = Objects.currentObjectsByName[objName]
+ // Set values
+ if(parent.pickX && parent.pickY) {
+ history.addToHistory(new HistoryLib.EditedPosition(
+ objName, objType, obj[propertyX], newValueX, obj[propertyY], newValueY
))
- obj[propertyX] = newValue
- obj.update()
- objectLists.update()
- }
- if(parent.pickY) {
- let newValue = picked.mouseY.toString()
- newValue = {
- 'Expression': () => new MathLib.Expression(newValue),
- 'number': () => parseFloat(newValue)
- }[Objects.types[objType].properties()[propertyY]]()
- let obj = Objects.currentObjectsByName[objName] // Objects.getObjectByName(objName, objType)
+ obj[propertyX] = newValueX
+ obj[propertyY] = newValueY
+ } else if(parent.pickX) {
history.addToHistory(new HistoryLib.EditedProperty(
- objName, objType, propertyY, obj[propertyY], newValue
+ objName, objType, propertyX, obj[propertyX], newValueX
))
- obj[propertyY] = newValue
- obj.update()
- objectLists.update()
+ obj[propertyX] = newValueX
+ } else if(parent.pickY) {
+ history.addToHistory(new HistoryLib.EditedProperty(
+ objName, objType, propertyY, obj[propertyY], newValueY
+ ))
+ obj[propertyY] = newValueY
}
+ obj.update()
+ objectLists.update()
}
pickerRoot.visible = false;
}
@@ -214,4 +209,14 @@ Item {
}
+ /*!
+ \qmlmethod void History::parseValue(string value, string objType, string propertyName)
+ Parses a given \c value as an expression or a number depending on the type of \c propertyName of all \c objType.
+ */
+ function parseValue(value, objType, propertyName) {
+ return {
+ 'Expression': () => new MathLib.Expression(value),
+ 'number': () => parseFloat(value)
+ }[Objects.types[objType].properties()[propertyName]]()
+ }
}
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js
index 16f9c6e..92811d9 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js
@@ -18,14 +18,27 @@
.pragma library
+.import "../math/latex.js" as Latex
+
var themeTextColor;
+var imageDepth = 2;
+var fontSize = 14;
class Action {
- // Type of the action done.
+ /**
+ * Type of the action.
+ *
+ * @returns {string}
+ */
type(){return 'Unknown'}
- // Icon associated with the item
+ /**
+ * Icon associated with the action.
+ *
+ * @returns {string}
+ */
+ icon(){return 'position'}
// TargetName is the name of the object that's targeted by the event.
constructor(targetName = "", targetType = "Point") {
@@ -33,25 +46,67 @@ class Action {
this.targetType = targetType
}
+ /**
+ * Undoes the action.
+ *
+ * @returns {string}
+ */
undo() {}
+ /**
+ * Redoes the action.
+ *
+ * @returns {string}
+ */
redo() {}
+ /**
+ * Export the action to a serializable format.
+ * NOTE: These arguments will be reinputed in the constructor in this order.
+ *
+ * @returns {string}
+ */
export() {
return [this.targetName, this.targetType]
}
- // String used in the toolkit
+ /**
+ * Returns a string with the human readable description of the action.
+ *
+ * @returns {string}
+ */
getReadableString() {
return 'Unknown action'
}
- // Returns an HTML tag containing the icon of a type
+ /**
+ * Returns a string containing an HTML tag describing the icon of a type
+ *
+ * @param {string} type - Name of the icon to put in rich text.
+ * @returns {string}
+ */
getIconRichText(type) {
return ``
}
- // String used in the preview
+ /**
+ * Renders a LaTeX-formatted string to an image and wraps it in an HTML tag in a string.
+ *
+ * @param {string} latexString - Source string of the latex.
+ * @returns {string}
+ */
+ renderLatexAsHtml(latexString) {
+ if(!Latex.enabled)
+ throw new Error("Cannot render an item as LaTeX when LaTeX is disabled.")
+ let latexInfo = Latex.Renderer.render(latexString, imageDepth*fontSize+4, themeTextColor).split(",")
+ return ``
+ }
+
+ /**
+ * Returns a string with the HTML-formated description of the action.
+ *
+ * @returns {string}
+ */
getHTMLString() {
return this.getReadableString()
}
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js
index 9641967..3fca7b6 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js
@@ -94,8 +94,8 @@ class EditedProperty extends C.Action {
this.next = this.newValue.name.join(",")
break;
case "Dict":
- this.prev = JSON.stringify(this.previousValue).replace("'", "\\'").replace('"', "'")
- this.next = JSON.stringify(this.newValue).replace("'", "\\'").replace('"', "'")
+ this.prev = JSON.stringify(this.previousValue)
+ this.next = JSON.stringify(this.newValue)
break;
}
} else {
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js
new file mode 100644
index 0000000..d33ad71
--- /dev/null
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js
@@ -0,0 +1,95 @@
+/**
+ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions.
+ * Copyright (C) 2022 Ad5001
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+.pragma library
+
+.import "../objects.js" as Objects
+.import "../mathlib.js" as MathLib
+.import "../math/latex.js" as Latex
+.import "../utils.js" as Utils
+.import "../objs/common.js" as Common
+.import "common.js" as C
+
+class EditedPosition extends C.Action {
+ // Action used for objects that have a X and Y expression properties (points, texts...)
+ type(){return 'EditedPosition'}
+
+ icon(){return 'position'}
+
+ color(darkVer=false){
+ return darkVer ? 'seagreen' : 'lightseagreen';
+ }
+
+ constructor(targetName = "", targetType = "Point", previousXValue = "", newXValue = "", previousYValue = "", newYValue = "") {
+ super(targetName, targetType)
+ let imports = {
+ 'previousXValue': previousXValue,
+ 'previousYValue': previousYValue,
+ 'newXValue': newXValue,
+ 'newYValue': newYValue
+ }
+ for(let name in imports)
+ this[name] = (typeof imports[name]) == 'string' ? new MathLib.Expression(imports[name]) : imports[name]
+ this.setReadableValues()
+ }
+
+ undo() {
+ Objects.currentObjectsByName[this.targetName].x = this.previousXValue
+ Objects.currentObjectsByName[this.targetName].y = this.previousYValue
+ Objects.currentObjectsByName[this.targetName].update()
+ }
+
+ redo() {
+ Objects.currentObjectsByName[this.targetName].x = this.newXValue
+ Objects.currentObjectsByName[this.targetName].y = this.newYValue
+ Objects.currentObjectsByName[this.targetName].update()
+ }
+
+ setReadableValues() {
+ this.prevString = `(${this.previousXValue.toString()},${this.previousYValue.toString()})`
+ this.nextString = `(${this.newXValue.toString()},${this.newYValue.toString()})`
+ // Render as LaTeX
+ if(Latex.enabled) {
+ this.prevHTML = this.renderLatexAsHtml(`\\left(${this.previousXValue.latexMarkup},${this.previousYValue.latexMarkup}\\right)`)
+ this.nextHTML = this.renderLatexAsHtml(`\\left(${this.newXValue.latexMarkup},${this.newYValue.latexMarkup}\\right)`)
+ } else {
+ this.prevHTML = ' '+Utils.escapeHTML(this.prevString)+' '
+ this.nextHTML = ' '+Utils.escapeHTML(this.nextString)+' '
+ }
+
+ }
+
+ export() {
+ return [this.targetName, this.targetType, this.targetProperty,
+ this.previousXValue.toEditableString(), this.newXValue.toEditableString(),
+ this.previousYValue.toEditableString(), this.newYValue.toEditableString()]
+ }
+
+ getReadableString() {
+ return qsTr('Position of %1 %2 set from "%3" to "%4".')
+ .arg(Objects.types[this.targetType].displayType())
+ .arg(this.targetName).arg(this.prevString).arg(this.nextString)
+ }
+
+ getHTMLString() {
+ return qsTr('Position of %1 set from %2 to %3.')
+ .arg(' ' + this.targetName + ' ')
+ .arg(this.prevHTML)
+ .arg(this.nextHTML)
+ }
+}
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js
index c360cb7..70542af 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js
@@ -24,6 +24,7 @@
.import "history/create.js" as Create
.import "history/delete.js" as Delete
.import "history/editproperty.js" as EP
+.import "history/position.js" as Pos
.import "history/visibility.js" as V
.import "history/name.js" as Name
.import "history/color.js" as Color
@@ -35,6 +36,7 @@ var Action = Common.Action
var CreateNewObject = Create.CreateNewObject
var DeleteObject = Delete.DeleteObject
var EditedProperty = EP.EditedProperty
+var EditedPosition = Pos.EditedPosition
var EditedVisibility = V.EditedVisibility
var NameChanged = Name.NameChanged
var ColorChanged = Color.ColorChanged
@@ -44,6 +46,7 @@ var Actions = {
"CreateNewObject": CreateNewObject,
"DeleteObject": DeleteObject,
"EditedProperty": EditedProperty,
+ "EditedPosition": EditedPosition,
"EditedVisibility": EditedVisibility,
"NameChanged": NameChanged,
"ColorChanged": ColorChanged,
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js
index 4c57b07..06d0bfa 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js
@@ -25,6 +25,14 @@
* true if latex has been enabled by the user, false otherwise.
*/
var enabled = false
+/**
+ * LaTeX python backend QObject.
+ */
+var Renderer = null
+/**
+ * Default window color used to render LaTeX formulas.
+ */
+var defaultColor = "black"
/**
* Puts element within parenthesis.