Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Profile cleanup integration (#4993)
Browse files Browse the repository at this point in the history
* Smoothing of profile done with D3, and profile asked with offest=0

* Adapting test to offset=0

* Adding new param, removing smoothing as its not useful anymore as smart filling will not need smoothing

* fixing test with new param
  • Loading branch information
pakb authored Mar 9, 2020
1 parent 3b22dea commit 82d4476
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/profile/ProfileService.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ goog.require('ga_urlutils_service');
var data = $.param({
geom: wkt,
elevation_models: elevationModel,
offset: 1
offset: 0,
smart_filling: true
});

var config = {
Expand Down
2 changes: 1 addition & 1 deletion test/specs/profile/ProfileService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('ga_profile_service', function() {
var spy = sinon.spy($http, 'post');
gaProfile.create(feature);
expect(spy.callCount).to.be(1);
expect(spy.args[0][1]).to.be('geom=%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B0.0%2C0.0%5D%2C%5B1.0%2C0.0%5D%2C%5B1.0%2C1.0%5D%5D%7D&elevation_models=COMB&offset=1');
expect(spy.args[0][1]).to.be('geom=%7B%22type%22%3A%22LineString%22%2C%22coordinates%22%3A%5B%5B0.0%2C0.0%5D%2C%5B1.0%2C0.0%5D%2C%5B1.0%2C1.0%5D%5D%7D&elevation_models=COMB&offset=0&smart_filling=true');
var config = spy.args[0][2];
expect(config.cache).to.be(true);
expect(config.timeout).to.be.a(Object);
Expand Down

0 comments on commit 82d4476

Please # to comment.