{"action":"created","comment":{"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments/42091250","id":42091250,"diff_hunk":"@@ -42,15 +42,54 @@ goog.provide('ga_measure_service');\n         default: units = units || [' km', ' m'];\n                  break;\n       }\n+\n+      thousandSeparator = typeof thousandSeparator !== 'undefined' ?\n+        thousandSeparator : false;\n       // Having only one unit means we don't want to transform the measure.\n       if (units.length == 1) {\n-        return cleanAfterComma(measure) + units[0];\n+        if (thousandSeparator == true) {\n+        // Number formatting: we add 1000 indicator (eg. 20'000)\n+          if (measure >= factor) {\n+            var km = parseInt(measure / factor);\n+            var m = Math.round(measure - km * factor);\n+            if (m >= 100) {\n+              var str = km + '\\'' + m + units[0];\n+            } else if (m >= 10) {\n+              var str = km + '\\'0' + m + units[0];\n+            } else if (m >= 0) {\n+              var str = km + '\\'00' + m + units[0];\n+            }\n+            return str;\n+          } else if (measure < 0) {\n+            measure = Math.abs(measure);\n+            if (measure >= factor) {\n+              var km = parseInt(measure / factor);\n+              var m = Math.round(measure - km * factor);\n+              if (m >= 100) {\n+                var str = '-' + km + '\\'' + m + units[0];\n+              } else if (m >= 10) {\n+                var str = '-' + km + '\\'0' + m + units[0];\n+              } else if (m >= 0) {\n+                var str = '-' + km + '\\'00' + m + units[0];\n+              }\n+              return str;\n+            } else {\n+              var str = '-' + measure + units[0];\n+              return str;\n+            }\n+          } else {","path":"src/components/measure/MeasureService.js","position":null,"original_position":49,"commit_id":"34d5c3709166228fa02897ce77a620a33d97aff3","original_commit_id":"79c4fcb5e362ca4968fadfee7f8a70d296ccfeab","user":{"login":"mariavkourouni","id":14076451,"avatar_url":"https://avatars.githubusercontent.com/u/14076451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariavkourouni","html_url":"https://github.com/mariavkourouni","followers_url":"https://api.github.com/users/mariavkourouni/followers","following_url":"https://api.github.com/users/mariavkourouni/following{/other_user}","gists_url":"https://api.github.com/users/mariavkourouni/gists{/gist_id}","starred_url":"https://api.github.com/users/mariavkourouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariavkourouni/subscriptions","organizations_url":"https://api.github.com/users/mariavkourouni/orgs","repos_url":"https://api.github.com/users/mariavkourouni/repos","events_url":"https://api.github.com/users/mariavkourouni/events{/privacy}","received_events_url":"https://api.github.com/users/mariavkourouni/received_events","type":"User","site_admin":false},"body":"thank you","created_at":"2015-10-15T07:35:58Z","updated_at":"2015-10-15T07:35:58Z","html_url":"https://github.com/geoadmin/mf-geoadmin3/pull/2754#discussion_r42091250","pull_request_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754","_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments/42091250"},"html":{"href":"https://github.com/geoadmin/mf-geoadmin3/pull/2754#discussion_r42091250"},"pull_request":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754"}}},"pull_request":{"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754","id":47167988,"html_url":"https://github.com/geoadmin/mf-geoadmin3/pull/2754","diff_url":"https://github.com/geoadmin/mf-geoadmin3/pull/2754.diff","patch_url":"https://github.com/geoadmin/mf-geoadmin3/pull/2754.patch","issue_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/2754","number":2754,"state":"open","locked":false,"title":"Profile elevation differences","user":{"login":"mariavkourouni","id":14076451,"avatar_url":"https://avatars.githubusercontent.com/u/14076451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariavkourouni","html_url":"https://github.com/mariavkourouni","followers_url":"https://api.github.com/users/mariavkourouni/followers","following_url":"https://api.github.com/users/mariavkourouni/following{/other_user}","gists_url":"https://api.github.com/users/mariavkourouni/gists{/gist_id}","starred_url":"https://api.github.com/users/mariavkourouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariavkourouni/subscriptions","organizations_url":"https://api.github.com/users/mariavkourouni/orgs","repos_url":"https://api.github.com/users/mariavkourouni/repos","events_url":"https://api.github.com/users/mariavkourouni/events{/privacy}","received_events_url":"https://api.github.com/users/mariavkourouni/received_events","type":"User","site_admin":false},"body":"\r\n\r\n[Demo](https://mf-geoadmin3.dev.bgdi.ch/kom_elevations/)","created_at":"2015-10-08T15:29:34Z","updated_at":"2015-10-15T07:35:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"623a176037e7e0affd0163f97b33df2e5372d40f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754/commits","review_comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754/comments","review_comment_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/2754/comments","statuses_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/34d5c3709166228fa02897ce77a620a33d97aff3","head":{"label":"geoadmin:kom_elevations","ref":"kom_elevations","sha":"34d5c3709166228fa02897ce77a620a33d97aff3","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399273,"name":"mf-geoadmin3","full_name":"geoadmin/mf-geoadmin3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-geoadmin3","description":"map.geo.admin.ch source code","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3","forks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/releases{/id}","created_at":"2013-05-31T06:37:20Z","updated_at":"2015-10-08T09:19:24Z","pushed_at":"2015-10-15T07:35:44Z","git_url":"git://github.com/geoadmin/mf-geoadmin3.git","ssh_url":"git@github.com:geoadmin/mf-geoadmin3.git","clone_url":"https://github.com/geoadmin/mf-geoadmin3.git","svn_url":"https://github.com/geoadmin/mf-geoadmin3","homepage":"http://map.geo.admin.ch","size":56064,"stargazers_count":78,"watchers_count":78,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":90,"forks":35,"open_issues":90,"watchers":78,"default_branch":"master"}},"base":{"label":"geoadmin:master","ref":"master","sha":"3cef1280fd10a995060b35a571c1f96d13a9d46a","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399273,"name":"mf-geoadmin3","full_name":"geoadmin/mf-geoadmin3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-geoadmin3","description":"map.geo.admin.ch source code","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-geoadmin3","forks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-geoadmin3/releases{/id}","created_at":"2013-05-31T06:37:20Z","updated_at":"2015-10-08T09:19:24Z","pushed_at":"2015-10-15T07:35:44Z","git_url":"git://github.com/geoadmin/mf-geoadmin3.git","ssh_url":"git@github.com:geoadmin/mf-geoadmin3.git","clone_url":"https://github.com/geoadmin/mf-geoadmin3.git","svn_url":"https://github.com/geoadmin/mf-geoadmin3","homepage":"http://map.geo.admin.ch","size":56064,"stargazers_count":78,"watchers_count":78,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":90,"forks":35,"open_issues":90,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754"},"html":{"href":"https://github.com/geoadmin/mf-geoadmin3/pull/2754"},"issue":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/2754"},"comments":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/issues/2754/comments"},"review_comments":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754/comments"},"review_comment":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/pulls/2754/commits"},"statuses":{"href":"https://api.github.com/repos/geoadmin/mf-geoadmin3/statuses/34d5c3709166228fa02897ce77a620a33d97aff3"}}}}