background gradients refactoring
This commit is contained in:
@@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
props: ['concernement'],
|
||||
created () {
|
||||
console.log("ConcernementsMapItem concernement", this.concernement);
|
||||
// console.log("ConcernementsMapItem concernement", this.concernement);
|
||||
this.entites = this.concernement.entites
|
||||
this.parsePoints()
|
||||
this.getSalientPoints()
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
parsePoints (){
|
||||
for (let i = 0; i < this.entites.length; i++) {
|
||||
let entite = this.entites[i]
|
||||
console.log('entite', entite);
|
||||
// console.log('entite', entite);
|
||||
|
||||
this.entites[i].display = {
|
||||
alpha: null,
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
this.salientPoints.push(farest.display)
|
||||
}
|
||||
}
|
||||
console.log('this.salientPoints', this.salientPoints);
|
||||
// console.log('this.salientPoints', this.salientPoints);
|
||||
},
|
||||
animate () {
|
||||
if (this.ctx) {
|
||||
@@ -163,11 +163,13 @@ export default {
|
||||
this.ctx.beginPath();
|
||||
this.ctx.lineWidth = 1;
|
||||
this.ctx.strokeStyle = "#000";
|
||||
this.ctx.fillStyle = "rgba(255,255,255,0.4)";
|
||||
this.ctx.moveTo(this.pos.x+this.salientPoints[0].pos.x, this.pos.y+this.salientPoints[0].pos.y)
|
||||
for (let j = 1; j < this.salientPoints.length; j++) {
|
||||
this.ctx.lineTo(this.pos.x+this.salientPoints[j].pos.x, this.pos.y+this.salientPoints[j].pos.y)
|
||||
}
|
||||
this.ctx.lineTo(this.pos.x+this.salientPoints[0].pos.x, this.pos.y+this.salientPoints[0].pos.y)
|
||||
this.ctx.fill();
|
||||
this.ctx.stroke();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user