map.js 915 B

123456789101112131415161718192021222324
  1. (function ($ang, win) {
  2. 'use strict';
  3. $ang.module('ylmis').controller("mapCtrl", ['$scope', '$rootScope', '$state', '$http', '$loading', '$alert', '$interval', '$window', '$modal', 'AuthUser',
  4. function ($scope, $rootScope, $state, $http, $loading, $alert, $desData, $interval, $window, $modal, AuthUser) {
  5. $("#mapimg").css("height", $(window).height());
  6. var minX = 0.757002;
  7. var maxX = 0.891748;
  8. var minY = 0.422746;
  9. var maxY = 0.536480;
  10. $("#mapimg").click(function (e) {
  11. var img = $("#mapimg")[0];
  12. if (e.offsetX >= minX * img.width && e.offsetX <= maxX * img.width && e.offsetY >= minY * img.height && e.offsetY <= maxY * img.height) {
  13. $state.go("map-index");
  14. }
  15. else {
  16. }
  17. });
  18. }]);
  19. })(angular, this);