Merge lp:~costales/unav/0.61-easing-animations into lp:unav

Proposed by costales
Status: Merged
Merged at revision: 93
Proposed branch: lp:~costales/unav/0.61-easing-animations
Merge into: lp:unav
Diff against target: 58 lines (+9/-8)
2 files modified
nav/class/UI.js (+8/-7)
nav/index.html (+1/-1)
To merge this branch: bzr merge lp:~costales/unav/0.61-easing-animations
Reviewer Review Type Date Requested Status
costales Pending
Review via email: mp+300275@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nav/class/UI.js'
2--- nav/class/UI.js 2016-07-17 13:12:19 +0000
3+++ nav/class/UI.js 2016-07-17 13:32:44 +0000
4@@ -196,8 +196,8 @@
5
6 // Fit route to view
7 if (redraw_map) {
8- var pan = ol.animation.pan({duration: 600, source: map.getView().getCenter()});
9- var zoom = ol.animation.zoom({duration: 600, resolution: map.getView().getResolution()});
10+ var pan = ol.animation.pan({duration: 600, source: map.getView().getCenter(), easing: ol.easing.linear});
11+ var zoom = ol.animation.zoom({duration: 600, resolution: map.getView().getResolution(), easing: ol.easing.linear});
12 this.map.beforeRender(pan, zoom);
13
14 var aux_height = 0;
15@@ -338,7 +338,8 @@
16
17 map.beforeRender(ol.animation.pan({
18 duration: 600,
19- source: map.getView().getCenter()
20+ source: map.getView().getCenter(),
21+ easing: ol.easing.linear
22 }));
23 map.getView().setCenter(ol.proj.transform([event.data.lng, event.data.lat], 'EPSG:4326', 'EPSG:3857'));
24
25@@ -353,8 +354,8 @@
26 }
27
28 // Show PopUp if poi.length = 1
29- var pan = ol.animation.pan({duration: 600, source: map.getView().getCenter()});
30- var zoom = ol.animation.zoom({duration: 600, resolution: map.getView().getResolution()});
31+ var pan = ol.animation.pan({duration: 600, source: map.getView().getCenter(), easing: ol.easing.linear});
32+ var zoom = ol.animation.zoom({duration: 600, resolution: map.getView().getResolution(), easing: ol.easing.linear});
33 this.map.beforeRender(pan, zoom);
34 if (pois.length === 1) {
35 this.map.getView().setCenter(ol.proj.transform([pois[0].lng, pois[0].lat], 'EPSG:4326', 'EPSG:3857'));
36@@ -662,8 +663,8 @@
37 this.zoom_unav = true;
38
39 var rotate = ol.animation.rotate({duration: 600, rotation: map.getView().getRotation(), easing: ol.easing.linear});
40- var pan = ol.animation.pan({duration: 600, source: map.getView().getCenter()});
41- var zoom = ol.animation.zoom({duration: 600, resolution: map.getView().getResolution()});
42+ var pan = ol.animation.pan({duration: 600, source: map.getView().getCenter(), easing: ol.easing.linear});
43+ var zoom = ol.animation.zoom({duration: 600, resolution: map.getView().getResolution(), easing: ol.easing.linear});
44 this.map.beforeRender(pan, zoom, rotate);
45 }
46
47
48=== modified file 'nav/index.html'
49--- nav/index.html 2016-07-15 18:39:49 +0000
50+++ nav/index.html 2016-07-17 13:32:44 +0000
51@@ -432,7 +432,7 @@
52 function custom_zoom(value) {
53 ui.set_zoom_unav(false);
54
55- var zoom = ol.animation.zoom({duration: 300, resolution: map.getView().getResolution()});
56+ var zoom = ol.animation.zoom({duration: 300, resolution: map.getView().getResolution(), easing: ol.easing.linear});
57 map.beforeRender(zoom);
58 map.getView().setZoom(map.getView().getZoom() + value);
59

Subscribers

People subscribed via source and target branches