Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ericz/shot3
base: 09cf68909c
...
head fork: ericz/shot3
compare: 3f4e8df650
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 6 additions and 4 deletions.
  1. +6 −4 admin/public/js/index.js
View
10 admin/public/js/index.js
@@ -2,8 +2,10 @@
var bridge;
var physics;
-var addRect = function addRect (w, h) {
- $('<div></div>').data('o', 0).dblclick(rotate).addClass('rect').css({width: w/7, height: h/7, 'background-color': '#'+Math.floor(Math.random()*16777215).toString(16)}).draggable({snap:true, snapMode: 'outer'}).appendTo('#field');
+
+
+var addRect = function addRect (w, h, callback) {
+ $('<div></div>').data('o', 0).data('cb', callback).dblclick(rotate).addClass('rect').css({width: w/7, height: h/7, 'background-color': '#'+Math.floor(Math.random()*16777215).toString(16)}).draggable({snap:true, snapMode: 'outer'}).appendTo('#field');
};
var send = function send () {
@@ -17,10 +19,10 @@ var send = function send () {
height: $(this).height()*7,
x: pos.left * 7,
y: pos.top * 7,
- orientation: $(this).data('o')
+ orientation: $(this).data('o'),
+ callback: [$(this).data('cb')]
});
});
-
physics.start(data, 5,5);
};

No commit comments for this range

Something went wrong with that request. Please try again.