From 73b5c911da397cffe78291950a83b48f64218163 Mon Sep 17 00:00:00 2001 From: bach Date: Thu, 1 Jun 2023 11:15:10 +0200 Subject: [PATCH] added padding for fisrt map item random positioning --- src/components/ConcernementMapItem.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index 2b9a612..ef99eca 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -223,9 +223,10 @@ export default { this.initMatterBody() }, getRandomPos(){ + let pad = 200; return { - x: this.ray/2 + Math.random()*(this.canvas.width - this.ray), - y: this.ray/2 + Math.random()*(this.canvas.height - this.ray) + x: pad + this.ray/2 + Math.random()*(this.canvas.width - this.ray - pad), + y: pad + this.ray/2 + Math.random()*(this.canvas.height - this.ray - pad) }; }, initMatterBody (){