Skip to content
Snippets Groups Projects
Commit c5dce360 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Registry Map: fix marker loading

parent 5b85b0fc
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,8 @@ function MapRegistryViewController($scope, $filter, $templateCache, $interpolate
};
$scope.loading = true;
$scope.mapId = 'map-wot-' + $scope.$id;
$scope.loadingMarker = true;
$scope.mapId = 'map-registry-' + $scope.$id;
$scope.map = MapUtils.map({
cache: 'map-registry',
......@@ -317,12 +318,14 @@ function MapRegistryViewController($scope, $filter, $templateCache, $interpolate
lat: hit.geoPoint.lat,
lng: hit.geoPoint.lon,
getMessageScope: function () {
$scope.loading = true;
$scope.$applyAsync(function() {
angular.extend($scope.formData, hit);
$scope.loading = false;
var scope = $scope.$new();
scope.loadingMarker = true;
scope.formData = {};
scope.$applyAsync(function() {
angular.extend(scope.formData, hit);
scope.loadingMarker = false;
});
return $scope;
return scope;
},
focus: false,
message: pageMarkerTemplate,
......
......@@ -338,17 +338,19 @@ function MapWotViewController($scope, $filter, $templateCache, $interpolate, $ti
lat: hit.geoPoint.lat,
lng: hit.geoPoint.lon,
getMessageScope: function () {
$scope.loadingMarker = true;
$scope.$applyAsync(function() {
$scope.formData = {
var scope = $scope.$new();
scope.loadingMarker = true;
scope.formData = {};
scope.$applyAsync(function() {
scope.formData = {
pubkey: hit.pubkey,
uid: hit.uid,
name: hit.name,
profile: hit
};
$scope.loadingMarker = false;
scope.loadingMarker = false;
});
return $scope;
return scope;
},
focus: false,
message: markerTemplate,
......
<div class="item no-border no-padding item-avatar "
ng-if="loading">
ng-if="loadingMarker">
<i class="item-image icon ion-person"></i>
......@@ -17,7 +17,7 @@
</div>
<a class="item no-border no-padding item-avatar ink animate-fade-in animate-show-hide ng-hide"
ng-show="!loading"
ng-show="!loadingMarker"
ui-sref="app.view_page({id: formData.id, title: formData.name})">
<i ng-if="formData.avatar" class="item-image avatar" style="background-image: url({{::formData.avatar.src}}"></i>
<i ng-if="!formData.avatar" class="item-image icon cion-page-{{::formData.type}}"></i>
......@@ -41,7 +41,7 @@
ng-class="{'ion-arrow-down-b': !showDescription, 'ion-arrow-up-b': showDescription}"
ng-click="showDescription=!showDescription;"
title="{{'PROFILE.DESCRIPTION'|translate}}"
ng-show="!loading && formData.description">
ng-show="!loadingMarker && formData.description">
&nbsp;
</a>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment