From 1b06bfa4b67747229c3283a9466047b1daece035 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 25 Apr 2014 16:08:48 -0400 Subject: improve names --- assets/javascripts/rectangles/models/wall.js | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 assets/javascripts/rectangles/models/wall.js (limited to 'assets/javascripts/rectangles/models/wall.js') diff --git a/assets/javascripts/rectangles/models/wall.js b/assets/javascripts/rectangles/models/wall.js new file mode 100644 index 0000000..e25d2dd --- /dev/null +++ b/assets/javascripts/rectangles/models/wall.js @@ -0,0 +1,31 @@ +window.wall = (function(){ + + var wall = function(opt){ + this.id = opt.id + this.room = opt.room + this.rect = opt.rect + this.mx = [] + } + + wall.prototype.toString = function(){ + return this.rect.toString() + } + + wall.prototype.reset = function(){ + } + + wall.prototype.bind = function(){ + this.$walls.bind({ + mouseover: function(){ + }, + mousemove: function(e){ + }, + mousedown: function(){ + $(this).css("background-color", choice(window.palettes.colors)) + } + }) + } + + return wall + +})() -- cgit v1.2.3-70-g09d2