From a8692abfb927cd9b1eec477885d15f8036fb00c7 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 6 Oct 2023 12:18:55 +0200 Subject: [PATCH] removed dashed circles from boussole #2309 --- src/components/MapConcernements.vue | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/MapConcernements.vue b/src/components/MapConcernements.vue index f87f7d8..ef07dd6 100644 --- a/src/components/MapConcernements.vue +++ b/src/components/MapConcernements.vue @@ -303,7 +303,7 @@ export default { let ray = this.map_item_ray; let pos = {x:0, y:0}; - // big global exterior circle to keep center aligned + // big invisible global exterior circle to keep center aligned children.push(new paper.Path.Circle({ center: [0, 0], radius: ray*3, @@ -313,18 +313,19 @@ export default { } })); - // cercles pointillés + // cercles for (let i = 1; i < 9; i++) { - let sw = i === 4 || i === 8 ? 0.5 : 0.25; - let da = i === 4 || i === 8 ? null : [5,5]; - children.push(new paper.Path.Circle({ - center: [pos.x, pos.y], - radius: ray/8*i, - strokeColor: '#fff', - strokeWidth: sw, - dashArray: da - })); - + let sw = i === 4 || i === 8 ? 0.5 : 0.25; // width + let da = i === 4 || i === 8 ? null : [5,5]; // dash array + if (!da) { // draw only 2 main non-dashed circles + children.push(new paper.Path.Circle({ + center: [pos.x, pos.y], + radius: ray/8*i, + strokeColor: '#fff', + strokeWidth: sw, + dashArray: da + })); + } } // axes