From 039f44072bf2751cbee17cd2547181fa1b85539a Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 6 Nov 2023 17:06:37 +0100 Subject: [PATCH] entite action picto #2249 --- src/components/ConcernementMapItem.vue | 5 +- src/components/MapConcernements.vue | 81 +++++++++++++++++--------- 2 files changed, 56 insertions(+), 30 deletions(-) diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index 38a6f2a..2cb1c05 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -741,6 +741,7 @@ export default { break; } + console.log(`item_type: ${item_type}, symbol_name: ${symbol_name}`); let instance = new paper.SymbolItem(this.paper_symbol_definitions[symbol_name]); instance.name = 'entite'; @@ -1591,10 +1592,10 @@ export default { let group = this.map_mode === 'terraindevie' ? this.paper_main_object.children['entites'] : this.paper_main_object.children['agissantes']; if(group){ group.children.forEach((item) => { - if (this.opened_entite_id && item.item_id === parseInt(this.opened_entite_id)) { + if (this.opened_entite_id && item.item_id === parseInt(this.opened_entite_id) && item.item_type !== 'entite_hidden') { item.definition = item.item_type === 'entite' ? this.paper_symbol_definitions.entite_hover : this.paper_symbol_definitions.entite_action_hover; } else { - if (!this.hover_elmt || item.item_id !== this.hover_elmt.id) { + if ((!this.hover_elmt || item.item_id !== this.hover_elmt.id) && item.item_type !== 'entite_hidden') { item.definition = item.item_type === 'entite' ? this.paper_symbol_definitions.entite : this.paper_symbol_definitions.entite_action; } } diff --git a/src/components/MapConcernements.vue b/src/components/MapConcernements.vue index 1728d6a..c638a9b 100644 --- a/src/components/MapConcernements.vue +++ b/src/components/MapConcernements.vue @@ -1014,29 +1014,42 @@ export default { // svgIcon.fillColor = null; // svgIcon.position = {x:0, y:0}; let children = []; - let ray = 0.7; //this.map_item_ray; - let pos = {x:0, y:0}; - let strokewidth = 0.4; + let ray = 1; //this.map_item_ray; + // let pos = {x:0, y:0}; - children.push(new paper.Path.Line({ - from: [- ray, ray], - to: [ray, - ray], - strokeColor: '#000', - strokeWidth: strokewidth - })); + // children.push(new paper.Path.Line({ + // from: [- ray, ray], + // to: [ray, - ray], + // strokeColor: '#000', + // strokeWidth: strokewidth + // })); - children.push(new paper.Path.Line({ - from: [ray, ray], - to: [- ray, - ray], - strokeColor: '#000', - strokeWidth: strokewidth - })); + // children.push(new paper.Path.Line({ + // from: [ray, ray], + // to: [- ray, - ray], + // strokeColor: '#000', + // strokeWidth: strokewidth + // })); + + + children.push(new paper.Path.Circle({ + radius: ray/2, + fillColor: 'rgba(0,0,0,1)' + })) + + children.push(new paper.Path.Circle({ + radius: ray, + strokeColor: 'rgba(0,0,0,1)', + strokeWidth: 0.2, + fillColor: 'rgba(0,0,0,0)' + })) children.push(new paper.Path.Circle({ radius: ray, fillColor: 'rgba(255,255,255,0.01)' })) + return new paper.Group({ children: children, name: 'action_icon' @@ -1061,22 +1074,34 @@ export default { // }); let children = []; let ray = 0.7; //this.map_item_ray; - let pos = {x:0, y:0}; - let strokewidth = 0.4; + // let pos = {x:0, y:0}; + // let strokewidth = 0.4; - children.push(new paper.Path.Line({ - from: [- ray, ray], - to: [ray, - ray], - strokeColor: '#01ffe2', - strokeWidth: strokewidth - })); + // children.push(new paper.Path.Line({ + // from: [- ray, ray], + // to: [ray, - ray], + // strokeColor: '#01ffe2', + // strokeWidth: strokewidth + // })); - children.push(new paper.Path.Line({ - from: [ray, ray], - to: [- ray, - ray], + // children.push(new paper.Path.Line({ + // from: [ray, ray], + // to: [- ray, - ray], + // strokeColor: '#01ffe2', + // strokeWidth: strokewidth + // })); + + children.push(new paper.Path.Circle({ + radius: ray/2, + fillColor: '#01ffe2' + })) + + children.push(new paper.Path.Circle({ + radius: ray, strokeColor: '#01ffe2', - strokeWidth: strokewidth - })); + strokeWidth: 0.2, + fillColor: 'rgba(0,0,0,0)' + })) children.push(new paper.Path.Circle({ radius: ray,