import VectorType from '../enum/VectorType.js' import Geometry from './Geometry' import { mathUtil } from '../MathUtil.js' import SelectState from '../enum/SelectState.js' import { coordinate } from '../Coordinate' export default class CustomImage extends Geometry { constructor(url,center,vectorId) { super() this.center = center this.url = url; this.image = null; this.width = 40; this.height = 30; this.angle = 0 //逆时针为负,顺时针为正。单位是:° this.scale = 1 //缩放比例 this.geoType = VectorType.CustomImage this.setId(vectorId) } isContain(position) { if(Math.abs(position.x - this.center.x)* coordinate.res * coordinate.zoom/ 100