From 37802fb83e5f451efa5e2bc05e563808ed7a554b Mon Sep 17 00:00:00 2001 From: wronny Date: Thu, 14 May 2020 00:39:04 +0200 Subject: [PATCH] fix issue #367 approach to fix issue #367 internal in maps without changing global styles Signed-off-by: wronny --- src/photosController.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/photosController.js b/src/photosController.js index 7059a5cf4..32bb3255a 100644 --- a/src/photosController.js +++ b/src/photosController.js @@ -324,7 +324,14 @@ PhotosController.prototype = { // we update the counter var catCounter = $('#navigation-photos .app-navigation-entry-utils-counter'); - catCounter.text(this.photoMarkers.length); + var photoCounter = this.photoMarkers.length; + if ( photoCounter >= 10000 ){ + catCounter.attr('title', photoCounter + ' photos'); + photoCounter = photoCounter = Math.floor(photoCounter / 1000) ; + catCounter.text( photoCounter + 'k'); + }else{ + catCounter.text(photoCounter); + } // we put them all in the layer this.photoMarkersFirstVisible = 0;