Merge lp://staging/~huwshimi/juju-gui/background-drag into lp://staging/juju-gui/experimental
Proposed by
Huw Wilkins
Status: | Merged |
---|---|
Merged at revision: | 1216 |
Proposed branch: | lp://staging/~huwshimi/juju-gui/background-drag |
Merge into: | lp://staging/juju-gui/experimental |
Diff against target: |
14 lines (+5/-0) 1 file modified
app/views/topology/panzoom.js (+5/-0) |
To merge this branch: | bzr merge lp://staging/~huwshimi/juju-gui/background-drag |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+197320@code.staging.launchpad.net |
Description of the change
Background panning
Fixed the background so that it moves when you pan the canvas. This has been bothering me for a while. Works for me accross browsers.
To post a comment you must log in.
Reviewers: mp+197320_ code.launchpad. net,
Message:
Please take a look.
Description:
Background panning
Fixed the background so that it moves when you pan the canvas. This has
been bothering me for a while. Works for me accross browsers.
https:/ /code.launchpad .net/~huwshimi/ juju-gui/ background- drag/+merge/ 197320
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/35880043/
Affected files (+7, -0 lines): topology/ panzoom. js
A [revision details]
M app/views/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: app/views/ topology/ panzoom. js topology/ panzoom. js' topology/ panzoom. js 2013-10-14 19:38:47 +0000 topology/ panzoom. js 2013-12-02 07:29:52 +0000
topo.set( 'translate' , Y.mix(evt. translate) );
vis.attr( 'transform' , 'translate(' + topo.get( 'translate' ) + ')' + .topology- canvas' ); setStyle( 'backgroundPosi tion', bgPosition);
topo.fire( 'rescaled' );
=== modified file 'app/views/
--- app/views/
+++ app/views/
@@ -259,6 +259,11 @@
' scale(' + topo.get('scale') + ')');
+ var canvas = Y.one('
+ if (canvas) {
+ var bgPosition = evt.translate[0] + 'px ' + evt.translate[1]
+ 'px';
+ canvas.
+ }
},