Merge pull request #5121 from Matt-Yorkley/flaky-maps-js

Update vendor/assets/angular-google-maps.min.js
This commit is contained in:
Luis Ramos
2020-04-02 22:13:51 +01:00
committed by GitHub
11 changed files with 5366 additions and 16 deletions

View File

@@ -9,6 +9,8 @@
#= require angular-animate
#= require angular-resource
#= require lodash.underscore.js
# bluebird.js is a dependency of angular-google-maps.js 2.0.0
#= require bluebird.js
#= require angular-scroll.min.js
#= require angular-google-maps.min.js
#= require ../shared/mm-foundation-tpls-0.9.0-20180826174721.min.js

View File

@@ -7,7 +7,7 @@ window.Darkswarm = angular.module("Darkswarm", [
'templates',
'ngSanitize',
'ngAnimate',
'google-maps',
'uiGmapgoogle-maps',
'duScroll',
'angularFileUpload',
'angularSlideables'

View File

@@ -1,6 +1,6 @@
Darkswarm.directive 'mapOsmTiles', ($timeout) ->
restrict: 'E'
require: '^googleMap'
require: '^uiGmapGoogleMap'
scope: {}
link: (scope, elem, attrs, ctrl) ->
$timeout =>

View File

@@ -1,7 +1,7 @@
Darkswarm.directive 'mapSearch', ($timeout, Search) ->
# Install a basic search field in a map
restrict: 'E'
require: ['^googleMap', 'ngModel']
require: ['^uiGmapGoogleMap', 'ngModel']
replace: true
template: '<input id="pac-input" ng-model="query" placeholder="' + t('location_placeholder') + '"></input>'
scope: {}

View File

@@ -50,7 +50,7 @@ Darkswarm.factory 'Enterprises', (enterprises, CurrentHub, Taxons, Dereferencer,
false
calculateDistance: (query, firstMatching) ->
if query?.length > 0
if query?.length > 0 and Geo.OK
if firstMatching?
@setDistanceFrom firstMatching
else

View File

@@ -1,6 +1,6 @@
Darkswarm.service "Geo", ->
new class Geo
OK: google.maps.GeocoderStatus.OK
OK: google?.maps?.GeocoderStatus?.OK
# Usage:
# Geo.geocode address, (results, status) ->

View File

@@ -34,10 +34,10 @@
select: "select(\'map\')"}
.map-container
%map{"ng-if" => "(isActive(\'/map\') && (mapShowed = true)) || mapShowed"}
%google-map{options: "map.additional_options", center: "map.center", zoom: "map.zoom", styles: "map.styles", draggable: "true"}
%ui-gmap-google-map{options: "map.additional_options", center: "map.center", zoom: "map.zoom", styles: "map.styles", draggable: "true"}
%map-osm-tiles
%map-search
%markers{models: "mapMarkers", fit: "true",
%ui-gmap-markers{models: "mapMarkers", fit: "true",
coords: "'self'", icon: "'icon'", click: "'reveal'"}
%tab{heading: t(:groups_about),

View File

@@ -6,10 +6,10 @@
.map-container{"fill-vertical" => true}
%map{"ng-controller" => "MapCtrl"}
%google-map{options: "map.additional_options", center: "map.center", zoom: "map.zoom", styles: "map.styles", draggable: "true"}
%ui-gmap-google-map{options: "map.additional_options", center: "map.center", zoom: "map.zoom", styles: "map.styles", draggable: "true"}
%map-osm-tiles
%map-search
%markers{models: "OfnMap.enterprises", fit: "true",
%ui-gmap-markers{models: "OfnMap.enterprises", fit: "true",
coords: "'self'", icon: "'icon'", click: "'reveal'"}
.map-footer

View File

@@ -16,5 +16,5 @@
//= require i18n
angular.module('templates', [])
angular.module('google-maps', []);
angular.module('uiGmapgoogle-maps', []);
angular.module('duScroll', []);

File diff suppressed because one or more lines are too long

5347
vendor/assets/javascripts/bluebird.js vendored Normal file

File diff suppressed because it is too large Load Diff