concenrment history bug fix #2295
This commit is contained in:
		@@ -196,10 +196,12 @@ export default {
 | 
			
		||||
      },
 | 
			
		||||
      deep: true
 | 
			
		||||
    },
 | 
			
		||||
    active_revision: {
 | 
			
		||||
    concernement: {
 | 
			
		||||
      handler (n, o){
 | 
			
		||||
        // console.log(`concernementMapItem watch active_revision o:${o}, n:${n}`);
 | 
			
		||||
        if(o & n){ // do not trigger on first variable filling (if o is null)
 | 
			
		||||
        // check for active_revision changes
 | 
			
		||||
        // do not trigger on first variable filling (if o is null)
 | 
			
		||||
        if(o && o.active_revision && n.active_revision){
 | 
			
		||||
          // console.log(`concernementMapItem watch concernement o.active_revision:${o.active_revision}, n.active_revision:${n.active_revision}`);
 | 
			
		||||
          this.resetPaperActiveRevision();
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
@@ -559,16 +561,19 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    resetPaperActiveRevision(){
 | 
			
		||||
      console.log('resetPaperActiveRevision');
 | 
			
		||||
      this.getJarvisEnvelopeConvexe();
 | 
			
		||||
      // remove contours if already exists
 | 
			
		||||
      if (this.paper_main_object.children.contours) {
 | 
			
		||||
        this.paper_main_object.children.contours.remove();
 | 
			
		||||
      }
 | 
			
		||||
      // redraw contours
 | 
			
		||||
      this.paper_main_object.addChild(this.setPaperContour());
 | 
			
		||||
      // remove entites if already exists
 | 
			
		||||
      if (this.paper_main_object.children.entites) {
 | 
			
		||||
        this.paper_main_object.children.entites.remove();
 | 
			
		||||
      }
 | 
			
		||||
      // redraw entites
 | 
			
		||||
      this.paper_main_object.addChild(this.setPaperEntites());
 | 
			
		||||
    },
 | 
			
		||||
    clearPaperContents(){
 | 
			
		||||
 
 | 
			
		||||
@@ -94,8 +94,8 @@ export default {
 | 
			
		||||
  watch: {
 | 
			
		||||
    history_value: {
 | 
			
		||||
      handler (n, o) {
 | 
			
		||||
        console.log(`TerrainDeVie watch history_value o:${o}, n:${n}`);
 | 
			
		||||
        this.setActiveRevision(this.concernement.id, n);
 | 
			
		||||
        // console.log(`TerrainDeVie watch history_value o:${o}, n:${n}`);
 | 
			
		||||
        this.setActiveRevision(this.cid, n);
 | 
			
		||||
      },
 | 
			
		||||
      deep: true
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -421,6 +421,7 @@ export const ConcernementsStore = defineStore({
 | 
			
		||||
      this.recit_plyr_player = player;
 | 
			
		||||
    },
 | 
			
		||||
    setActiveRevision (cid, rid) {
 | 
			
		||||
      // console.log(`setActiveRevision, cid:${cid}, rid:${rid}`);
 | 
			
		||||
      this.concernementsByID[cid].active_revision = rid;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user