commented some consolelog

This commit is contained in:
Bachir Soussi Chiadmi 2024-10-03 21:21:31 +02:00
parent c90baf9a31
commit b988b43a66
2 changed files with 11 additions and 11 deletions

View File

@ -95,7 +95,7 @@ export default {
...mapState(UserStore,['csrf_token']), ...mapState(UserStore,['csrf_token']),
}, },
created () { created () {
console.log('ConcernementMapItem created', this.mapitem); // console.log('ConcernementMapItem created', this.mapitem);
// this.id = this.superposition_id ? `${this.cid}___${this.superposition_id}` : this.cid; // this.id = this.superposition_id ? `${this.cid}___${this.superposition_id}` : this.cid;
// console.log(`this.mapitem.id`, this.mapitem.id); // console.log(`this.mapitem.id`, this.mapitem.id);
this.resetConcernement(); this.resetConcernement();
@ -268,7 +268,7 @@ export default {
}, },
concernement: { concernement: {
handler (n, o){ handler (n, o){
console.log(`ConcernementMapItem ${this.id} watch concernement o, n`, this.concernement.parsedEntites, o, n); // console.log(`ConcernementMapItem ${this.id} watch concernement o, n`, this.concernement.parsedEntites, o, n);
// check for active_revision changes // check for active_revision changes
// do not trigger on first variable filling (if o is null) // do not trigger on first variable filling (if o is null)
// check for new concernement object // check for new concernement object
@ -297,7 +297,7 @@ export default {
}, },
'concernement.besoins': { 'concernement.besoins': {
handler (n, o){ handler (n, o){
console.log(`ConcernementMapItem ${this.id} watch concernement.besoins o, n`, o, n); // console.log(`ConcernementMapItem ${this.id} watch concernement.besoins o, n`, o, n);
if (this.is_open && this.map_mode === "puissancedagir") { if (this.is_open && this.map_mode === "puissancedagir") {
// this.resetPaperBesoinReponsePos(); // this.resetPaperBesoinReponsePos();
this.setPaperPuissanceagirBesoins(true); // true for update=true this.setPaperPuissanceagirBesoins(true); // true for update=true
@ -307,7 +307,7 @@ export default {
}, },
'concernement.besoins.length': { 'concernement.besoins.length': {
handler (n, o){ handler (n, o){
console.log(`ConcernementMapItem ${this.id} watch concernement.besoins.length o, n`, o, n); // console.log(`ConcernementMapItem ${this.id} watch concernement.besoins.length o, n`, o, n);
if (this.is_open && this.map_mode === "puissancedagir" && o != null && n !== o) { if (this.is_open && this.map_mode === "puissancedagir" && o != null && n !== o) {
this.resetPaperContents(); this.resetPaperContents();
} }
@ -367,7 +367,7 @@ export default {
}, },
'concernement.entites': { 'concernement.entites': {
handler (n, o) { handler (n, o) {
console.log(`ConcernementMapItem ${this.id} watch concernement.entites o, n`, o, n); // console.log(`ConcernementMapItem ${this.id} watch concernement.entites o, n`, o, n);
// do not trigger on first fill of the property (if o is null) // do not trigger on first fill of the property (if o is null)
if (o) { if (o) {
this.resetPaperEntitesAndContours(); this.resetPaperEntitesAndContours();
@ -400,7 +400,7 @@ export default {
'setDetailsZoomValue', 'setDetailsZoomValue',
]), ]),
resetConcernement(){ resetConcernement(){
console.log(`resetConcernement() ${this.mapitem.id}`); // console.log(`resetConcernement() ${this.mapitem.id}`);
this.id = this.mapitem.id; this.id = this.mapitem.id;
this.concernement = this.concernementsByID[this.mapitem.cid];// this.mapitem.concernement; this.concernement = this.concernementsByID[this.mapitem.cid];// this.mapitem.concernement;
this.cid = this.concernement.id; this.cid = this.concernement.id;
@ -412,7 +412,7 @@ export default {
this.entites = this.concernement.revisions_byid[this.concernement.revision_id].entites; this.entites = this.concernement.revisions_byid[this.concernement.revision_id].entites;
}, },
parseEntityPointsValues (){ parseEntityPointsValues (){
console.log(`parseEntityPointsValues`); // console.log(`parseEntityPointsValues`);
// converts data (menace/maintien, actuel/future, prise) into atcual position x,y // converts data (menace/maintien, actuel/future, prise) into atcual position x,y
for (let r = 0; r < this.concernement.revisions.length; r++) { // loop through all revisions for (let r = 0; r < this.concernement.revisions.length; r++) { // loop through all revisions
for (let i = 0; i < this.concernement.revisions[r].entites.length; i++) { // loop through all entite for each revision for (let i = 0; i < this.concernement.revisions[r].entites.length; i++) { // loop through all entite for each revision
@ -960,7 +960,7 @@ export default {
} }
}, },
getPaddedRoundedSegments(points, scale){ getPaddedRoundedSegments(points, scale){
console.log(`setPaperContour ${this.concernement.id}, points`, points); // console.log(`setPaperContour ${this.concernement.id}, points`, points);
let getSegmentProps = (b,a,c) => { let getSegmentProps = (b,a,c) => {
const ac = { x: c.x - a.x, y: c.y - a.y } // get ac vecteur const ac = { x: c.x - a.x, y: c.y - a.y } // get ac vecteur
const lac = Math.sqrt(Math.pow(ac.x, 2) + Math.pow(ac.y, 2)); // get ac longueur ac const lac = Math.sqrt(Math.pow(ac.x, 2) + Math.pow(ac.y, 2)); // get ac longueur ac

View File

@ -29,7 +29,7 @@ export default {
// let hue = Math.floor(Math.random()*360) // let hue = Math.floor(Math.random()*360)
for (let j = 0; j < num_colors; j++) { for (let j = 0; j < num_colors; j++) {
let pos = (1/num_colors*j + 1/num_colors/3 + Math.random()*1/num_colors/3)*100; let pos = (1/num_colors*j + 1/num_colors/3 + Math.random()*1/num_colors/3)*100;
console.log('gradient pos', pos); // console.log('gradient pos', pos);
colors.push({ colors.push({
color: this.getRandBGColor(), color: this.getRandBGColor(),
@ -43,7 +43,7 @@ export default {
// }) // })
gradients.push(colors) gradients.push(colors)
} }
console.log('gradients', gradients); // console.log('gradients', gradients);
let cssgrad = ''; let cssgrad = '';
gradients.forEach((gradient, index) => { gradients.forEach((gradient, index) => {
@ -55,7 +55,7 @@ export default {
cssgrad += index < gradients.length-1 ? '),' : ')'; cssgrad += index < gradients.length-1 ? '),' : ')';
}); });
// cssgrad += ';'; // cssgrad += ';';
console.log('cssgrad', cssgrad); // console.log('cssgrad', cssgrad);
gradientBackground.style.background = cssgrad; gradientBackground.style.background = cssgrad;
}, },
getRandBGColor (hue) { getRandBGColor (hue) {