|
|
@ -73,7 +73,7 @@ export class AnxinImgLookComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
this.coordinate = dataArr; |
|
|
|
this.coordinate = dataArr; |
|
|
|
this.currentCoordinate = JSON.parse(JSON.stringify(this.coordinate)); |
|
|
|
this.currentCoordinate = JSON.parse(JSON.stringify(this.coordinate)); |
|
|
|
console.log("坐标信息", this.coordinate); |
|
|
|
// console.log("坐标信息", this.coordinate);
|
|
|
|
let checkboxArr = []; |
|
|
|
let checkboxArr = []; |
|
|
|
this.coordinate.forEach((element) => { |
|
|
|
this.coordinate.forEach((element) => { |
|
|
|
checkboxArr.push({ id: element.id, checked: true }); |
|
|
|
checkboxArr.push({ id: element.id, checked: true }); |
|
|
@ -98,8 +98,8 @@ export class AnxinImgLookComponent implements OnInit { |
|
|
|
const img = new Image(); |
|
|
|
const img = new Image(); |
|
|
|
img.src = imgBg.src; |
|
|
|
img.src = imgBg.src; |
|
|
|
img.onload = () => { |
|
|
|
img.onload = () => { |
|
|
|
console.log(1,this.canvasWidth) |
|
|
|
// console.log(1,this.canvasWidth)
|
|
|
|
console.log(2,this.canvasHeight) |
|
|
|
// console.log(2,this.canvasHeight)
|
|
|
|
const canvas: any = document.querySelector("#canvas"); |
|
|
|
const canvas: any = document.querySelector("#canvas"); |
|
|
|
this.ctx = canvas.getContext("2d"); |
|
|
|
this.ctx = canvas.getContext("2d"); |
|
|
|
const cWidth = canvas.width, |
|
|
|
const cWidth = canvas.width, |
|
|
|