Permalink
Browse files

fixes

Gruntfile: [-] compass in task server
Random Angle: -0.75 to +0.75
Arcitle position: transform translate
  • Loading branch information...
hugomallet committed Mar 20, 2013
1 parent 32584ba commit eb361578bc6ef3fc902b43ef4e3bf5ffbf459d9d
Showing with 7 additions and 5 deletions.
  1. +1 −1 Gruntfile.js
  2. +1 −1 app/scripts/views/application-view.js
  3. +5 −3 app/scripts/views/article-view.js
View
@@ -243,7 +243,7 @@ module.exports = function (grunt) {
grunt.task.run([
'clean:server',
'coffee:dist',
- 'compass:server',
+ //'compass:server',
'livereload-start',
'connect:livereload',
'open',
@@ -37,7 +37,7 @@ gravityBlog.Views.applicationView = BackboneGravity.Views.WorldView.extend({
y: view.$el.height() / 2,
width: view.$el.outerWidth(),
height: view.$el.outerHeight(),
- angle: Math.random() * 1.5 - 1.5
+ angle: Math.random() * 1.5 - 0.75
});
return false;
},
@@ -64,9 +64,11 @@ gravityBlog.Views.articleView = Backbone.View.extend({
update: function () {
var position = this.getPosition();
this.$el.css({
- left: position.x - this.$el.outerWidth() / 2,
- top: position.y - this.$el.outerHeight() / 2,
- transform: 'rotate(' + this.getAngle() + 'deg)'
+ //left: position.x - this.$el.outerWidth() / 2,
+ //top: position.y - this.$el.outerHeight() / 2,
+ transform:
+ 'translate(' + (position.x - this.$el.outerWidth() / 2) + 'px, ' + (position.y - this.$el.outerHeight() / 2) + 'px) ' +
+ 'rotate(' + this.getAngle() + 'deg)'
});
}

0 comments on commit eb36157

Please sign in to comment.