Agriculture module corrections (#13438)
* Agriculture module corrections * Update ternary_plot.js
This commit is contained in:
parent
c825e914d1
commit
6860036b01
@ -15,8 +15,8 @@ frappe.ui.form.on('Soil Texture', {
|
||||
},
|
||||
onload: function(frm) {
|
||||
if (frm.doc.soil_texture_criteria == undefined) frm.call('load_contents');
|
||||
if (this.ternary_plot) return;
|
||||
this.ternary_plot = new agriculture.TernaryPlot({
|
||||
if (frm.doc.ternary_plot) return;
|
||||
frm.doc.ternary_plot = new agriculture.TernaryPlot({
|
||||
parent: frm.get_field("ternary_plot").$wrapper,
|
||||
clay: frm.doc.clay_composition,
|
||||
sand: frm.doc.sand_composition,
|
||||
|
@ -172,17 +172,17 @@ agriculture.TernaryPlot = class TernaryPlot {
|
||||
make_plot_marking() {
|
||||
let { triangle_side: t, spacing: s, scaling_factor: p } = this.config;
|
||||
|
||||
let clay = this.paper.text(t * Snap.cos(60) / 2, s + t * Snap.cos(30) / 2, "Clay").attr({
|
||||
let clay = this.paper.text(t * Snap.cos(60) / 2, s + t * Snap.cos(30) / 2, __("Clay")).attr({
|
||||
fill: frappe.ui.color.get('black')
|
||||
});
|
||||
clay.transform("r300");
|
||||
|
||||
let silt = this.paper.text(t, s + t * Snap.cos(30) / 2, "Silt").attr({
|
||||
let silt = this.paper.text(t, s + t * Snap.cos(30) / 2, __("Silt")).attr({
|
||||
fill: frappe.ui.color.get('black')
|
||||
});
|
||||
silt.transform("r60");
|
||||
|
||||
let sand = this.paper.text(35 + t * Snap.cos(60), 90 + t * Snap.cos(30), "Sand").attr({
|
||||
let sand = this.paper.text(35 + t * Snap.cos(60), 90 + t * Snap.cos(30), __("Sand")).attr({
|
||||
fill: frappe.ui.color.get('black')
|
||||
});
|
||||
sand.transform("r0");
|
||||
@ -229,4 +229,4 @@ agriculture.TernaryPlot = class TernaryPlot {
|
||||
if (typeof this.blip !== 'undefined')
|
||||
this.blip.remove();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user