|
@@ -163,6 +163,7 @@ export default {
|
|
|
...mapActions(CommonStore,['setHoverElmt']),
|
|
|
...mapActions(ConcernementsStore,['openCloseConcernements']),
|
|
|
...mapActions(ConcernementsStore,['hideShowConcernement']),
|
|
|
+ ...mapActions(ConcernementsStore,['setBesoinPaperId']),
|
|
|
// getResponsiveRay(){
|
|
|
// return Math.min(this.canvas.width, this.canvas.height) * 0.08;
|
|
|
// },
|
|
@@ -600,6 +601,8 @@ export default {
|
|
|
besoin.item_cid = this.concernement.id;
|
|
|
besoin.item_type = 'besoin';
|
|
|
besoin.is_symbol_instance = true;
|
|
|
+ console.log(`paper besoin id:${besoin.id}`);
|
|
|
+ this.setBesoinPaperId(besoin.id, this.id, this.concernement.besoins[i].id);
|
|
|
g.addChild(besoin)
|
|
|
|
|
|
let res_arc = arc / (1 + this.concernement.besoins[i].reponses.length); // unit arc for responses depending responses number
|
|
@@ -621,6 +624,7 @@ export default {
|
|
|
reponse.item_cid = this.concernement.id;
|
|
|
reponse.item_type = 'reponse';
|
|
|
reponse.is_symbol_instance = true;
|
|
|
+ this.setBesoinPaperId(reponse.id, this.id, this.concernement.besoins[i].id, this.concernement.besoins[i].reponses[j].id);
|
|
|
g.addChild(reponse)
|
|
|
}
|
|
|
}
|
|
@@ -1035,9 +1039,13 @@ export default {
|
|
|
id: result.item.item_id
|
|
|
};
|
|
|
switch (result.item.item_type) {
|
|
|
+ case "besoin":
|
|
|
+ new_hover_elmt.no_popup = true;
|
|
|
+ break;
|
|
|
case "reponse":
|
|
|
new_hover_elmt.bid = result.item.item_bid;
|
|
|
new_hover_elmt.cid = result.item.item_cid;
|
|
|
+ new_hover_elmt.no_popup = true;
|
|
|
break;
|
|
|
}
|
|
|
if (!this.hover_elmt || new_hover_elmt.paper_id !== this.hover_elmt.paper_id) {
|
|
@@ -1336,7 +1344,7 @@ export default {
|
|
|
let fa = Math.exp(fa_minf + fa_scale*(dist-minp)*-1);
|
|
|
this.body.frictionAir = fa;
|
|
|
|
|
|
- console.log(`bringToCenter dist:${dist}, x_force:${x_force}, friction air:${fa}`);
|
|
|
+ // console.log(`bringToCenter dist:${dist}, x_force:${x_force}, friction air:${fa}`);
|
|
|
} else { // in the ceneter zone let items floats freely
|
|
|
let fa = 0.01;
|
|
|
let velocity = Matter.Body.getVelocity(this.body);
|
|
@@ -1347,7 +1355,7 @@ export default {
|
|
|
let velocity_range = [50, 1000];
|
|
|
let fa_range = [0,3];
|
|
|
fa = fa_range[0] + (velocityx - velocity_range[0]) * (fa_range[1] - fa_range[0]) / (velocity_range[1] - velocity_range[0]);
|
|
|
- console.log(`bringToCenter velocityx:${velocityx}, fa:${fa}, velocity`, velocity);
|
|
|
+ // console.log(`bringToCenter velocityx:${velocityx}, fa:${fa}, velocity`, velocity);
|
|
|
} else {
|
|
|
console.warn(`bringToCenter no velocity`, velocity);
|
|
|
}
|