some css on doleance content, started mouse events

This commit is contained in:
2023-06-07 16:53:19 +02:00
parent 0b9a1ae946
commit c0028a636b
4 changed files with 100 additions and 52 deletions

View File

@@ -1330,26 +1330,28 @@ export default {
let cam = new paper.Path({
strokeColor: '#fff',
strokeWidth: 2,
fillColor: "rgba(255, 255, 255, 0.4)"
fillColor: "rgba(255, 255, 255, 0.4)",
item_type: 'doleance_step',
item_id: 'lenquete'
});
cam.add({x: this.pos.x + n, y: this.pos.y + n});
cam.lineTo({x: this.pos.x + m , y: this.pos.y + m});
cam.arcTo({x: this.pos.x + p, y: this.pos.y + o}, {x: this.pos.x, y: this.pos.y + r});
cam.lineTo({x: this.pos.x, y: this.pos.y + dr});
cam.arcTo({x: this.pos.x + p_d, y: this.pos.y + o_d}, {x: this.pos.x + n, y: this.pos.y + n});
cam.add({x: this.pos.x , y: this.pos.y + dr});
cam.lineTo({x: this.pos.x, y: this.pos.y + r});
cam.arcTo({x: this.pos.x - p, y: this.pos.y + o}, {x: this.pos.x - m, y: this.pos.y + m});
cam.lineTo({x: this.pos.x - n, y: this.pos.y + n});
cam.arcTo({x: this.pos.x - p_d, y: this.pos.y + o_d}, {x: this.pos.x , y: this.pos.y + dr});
enquete.addChild(cam)
// texte
enquete.addChild(new paper.PointText({
point: {
x:this.pos.x + Math.sin(22.5*(Math.PI/180)) * r*0.75,
y:this.pos.y + Math.cos(22.5*(Math.PI/180)) * r*0.75
},
content: doleance['lenquete'],
fontSize: fontsize,
fillColor: '#fff',
justification: 'center'
}));
// enquete.addChild(new paper.PointText({
// point: {
// x:this.pos.x + Math.sin(22.5*(Math.PI/180)) * r*0.75,
// y:this.pos.y + Math.cos(22.5*(Math.PI/180)) * r*0.75
// },
// content: doleance['lenquete'],
// fontSize: fontsize,
// fillColor: '#fff',
// justification: 'center',
// locked: true
// }));
g.addChild(enquete);
//
@@ -1360,27 +1362,31 @@ export default {
});
// camenbert
let rescam = new paper.Path({
name: 'resolution',
item_type: 'doleance_step',
item_id: 'probleme_initial_resolu',
strokeColor: '#fff',
strokeWidth: 2,
fillColor: "rgba(255, 255, 255, 0.4)"
fillColor: "rgba(255, 255, 255, 0.4)",
});
rescam.add({x: this.pos.x , y: this.pos.y + dr});
rescam.lineTo({x: this.pos.x, y: this.pos.y + r});
rescam.arcTo({x: this.pos.x - p, y: this.pos.y + o}, {x: this.pos.x - m, y: this.pos.y + m});
rescam.lineTo({x: this.pos.x - n, y: this.pos.y + n});
rescam.arcTo({x: this.pos.x - p_d, y: this.pos.y + o_d}, {x: this.pos.x , y: this.pos.y + dr});
rescam.add({x: this.pos.x + n, y: this.pos.y + n});
rescam.lineTo({x: this.pos.x + m , y: this.pos.y + m});
rescam.arcTo({x: this.pos.x + p, y: this.pos.y + o}, {x: this.pos.x, y: this.pos.y + r});
rescam.lineTo({x: this.pos.x, y: this.pos.y + dr});
rescam.arcTo({x: this.pos.x + p_d, y: this.pos.y + o_d}, {x: this.pos.x + n, y: this.pos.y + n});
resolution.addChild(rescam)
// texte
resolution.addChild(new paper.PointText({
point: {
x:this.pos.x - Math.sin(22.5*(Math.PI/180)) * r*0.75,
y:this.pos.y + Math.cos(22.5*(Math.PI/180)) * r*0.75
},
content: doleance['probleme_initial_resolu'] ? doleance['oui_nouvelle_situation'] : doleance['non_adresse_doleance'],
fontSize: fontsize,
fillColor: '#fff',
justification: 'center'
}));
// resolution.addChild(new paper.PointText({
// point: {
// x:this.pos.x - Math.sin(22.5*(Math.PI/180)) * r*0.75,
// y:this.pos.y + Math.cos(22.5*(Math.PI/180)) * r*0.75
// },
// content: doleance['probleme_initial_resolu'] ? doleance['oui_nouvelle_situation'] : doleance['non_adresse_doleance'],
// fontSize: fontsize,
// fillColor: '#fff',
// justification: 'center'
// }));
g.addChild(resolution);
@@ -1468,22 +1474,32 @@ export default {
if (this.is_opened) {
// lets define some options regarding the map_mode
let paper_group_tohit;
let paper_group_tohit, op;
switch (this.map_mode) {
case "terraindevie":
paper_group_tohit = 'entites';
op = {};
break;
case "action":
paper_group_tohit = 'agissantes';
op = {};
break;
case "puissancedagir":
paper_group_tohit = 'puissanceagir_besoins';
op = {};
break;
case "doleancer":
paper_group_tohit = 'doleance_steps';
op = {
// class: paper.Path
fill: true
};
break;
}
let result = this.paper_objects.children[paper_group_tohit].hitTest(event.point);
let result = this.paper_objects.children[paper_group_tohit].hitTest(event.point, op);
// console.log('move result', result);
if (result) {
if (result && result.item.item_id) {
// console.log('move has result', result);
let hover_elmt = {
type: result.item.item_type,

View File

@@ -159,7 +159,7 @@ export default {
</ul>
</nav>
<ConcernementMapPopup
v-if="hover_elmt"
v-if="hover_elmt && hover_elmt.type !== 'doleance_step'"
:infos="hover_elmt"
/>
</template>