@osfarm/itineraire-technique 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/editor.html CHANGED
@@ -553,7 +553,8 @@
553
553
 
554
554
  $('.step-edit').click(function (event) {
555
555
  event.stopPropagation();
556
- let stepId = event.target.closest('.rotation_item').id;
556
+ let stepId = renderer.getElementID(event.target.closest('.rotation_item'));;
557
+
557
558
  let index = stepId.split('_')[1];
558
559
  selectedStep = new StepModel(crops.steps[index]);
559
560
  // populateCropDetailView(selectedStep);
@@ -29,11 +29,13 @@ class RotationRenderer {
29
29
 
30
30
  this.itk_container = $("#" + divID).css({ 'width': '100%' });
31
31
 
32
- this.itk_container.append(`<div class="row mainITKContainer">
33
- <div class="col-auto left-transcript"><div class="transcript"></div></div>
34
- <div class="col col-auto chart-div"><div class="charts"></div></div>
35
- <div class="col col-12 bottom-transcript"><div class="transcript"></div></div>
36
- </div>`);
32
+ if (this.itk_container.find('.mainITKContainer').length == 0) {
33
+ this.itk_container.append(`<div class="row mainITKContainer">
34
+ <div class="col-auto left-transcript"><div class="transcript"></div></div>
35
+ <div class="col col-auto chart-div"><div class="charts"></div></div>
36
+ <div class="col col-12 bottom-transcript"><div class="transcript"></div></div>
37
+ </div>`);
38
+ }
37
39
  }
38
40
 
39
41
  fixRotationData(rotationData) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osfarm/itineraire-technique",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "A visualisation tool to show agricultural technical itineraries based on Echarts",
5
5
  "main": "editor.html",
6
6
  "scripts": {