import { Component, OnInit } from '@angular/core'; import { HyperService } from '../../core/services/http.service'; import { LocalStorage } from "../../core/services/local_storage.service" import { Router } from "@angular/router"; import {Location} from '@angular/common'; import $ from 'jquery' declare var $: $ @Component({ selector: 'app-launch-sales', templateUrl: './launch-sales.component.html', styleUrls: ['./launch-sales.component.scss'] }) export class LaunchSalesComponent implements OnInit { salesList:any=[]; imageID:number; imageUrl:any; imageHotspot:any=[]; activeClass:boolean=false; xValue:number; yValue:number; loader:boolean=false; model_name:string; constructor(private server: HyperService, private router: Router,private loc:Location) { } ngOnInit() { this.model_name = LocalStorage.getValue('model_name') $(".lg-hotspot-label").show("fast"); $(".lg-hotspot-label").hide(); $(".lg-hotspot-button").click(function () { var thisLabel = $(this).siblings(".lg-hotspot-label"); var thisLabelState = thisLabel.css("display"); // console.log(thisLabel) $(".lg-hotspot-label").fadeOut(0).parent().css("z-index", "0"); if (thisLabelState == "none") { thisLabel.fadeIn(0); $(this).parent().css("z-index", "999"); } }); this.salesProcess() } salesProcess(){ this.loader=true; this.server.get("explore/salesprocess/"+LocalStorage.getValue('set_model_id')) .then((data) => { if (data.status == 200 && data.result.response != 'failed' && data.result.data != null) { this.loader=false; // console.log(data.result.data) this.salesList = data.result.data this.rotateImage(this.salesList[0]) } else if (data.result.status == 401 && data.result.response == 'failed') { } else { this.loader=false; alert(data.result.message) } }); } rotateImage(item){ var wid = 806/100; var hei = 520/100; // console.log(item) for(let i=0;i