CustomImageService.js 816 B

1234567891011121314151617181920212223242526272829
  1. import VectorType from '../enum/VectorType.js'
  2. import CustomImage from '../Geometry/CustomImage.js'
  3. import { mathUtil } from '../MathUtil.js'
  4. import { floorplanService } from './FloorplanService'
  5. import Constant from '../Constant'
  6. export default class CustomImageService {
  7. constructor() {
  8. this.url = null;
  9. }
  10. setCustomImageUrl(url){
  11. this.url = url;
  12. }
  13. createCustomImage(center,vectorId) {
  14. const customImage = new CustomImage(this.url, center,vectorId)
  15. floorplanService.addCustomImage(customImage)
  16. this.url = null;
  17. return customImage
  18. }
  19. deleteCustomImage(customImageId, floorNum) {
  20. floorplanService.deleteCustomImage(customImageId, floorNum)
  21. }
  22. }
  23. const customImageService = new CustomImageService()
  24. export { customImageService }