<NME> zoom.js
<BEF> ADDFILE
<MSG> zoom without scrollwheel... just started, v0.7

<DFF> @@ -0,0 +1,42 @@
+/**
+ * @namespace Provides a non-scrollwheel zooming interface
+ */
+var Zoom = {
+	initialize: function() {
+		$('canvas').observe('cartagen:postdraw', Zoom.draw.bindAsEventListener(this))
+	},
+	zoom_to: function() {
+		
+	},
+	width: 20,
+	height:0.4,
+	draw: function() {
+		
+		// Glop.height*0.3
+		$l('hey')
+		$C.save()
+		$C.fill_style('white')
+		$C.line_width(Zoom.width/Cartagen.zoom_level)
+		$C.opacity(0.7)
+		var x = Map.x-(1/Cartagen.zoom_level*(Glop.width/2))+(40/Cartagen.zoom_level), y = Map.y-(1/Cartagen.zoom_level*(Glop.height/2))+(40/Cartagen.zoom_level)
+		$C.begin_path()
+			$C.line_to(x,y)
+			$C.line_to(x,y+(Glop.height*Zoom.height)/Cartagen.zoom_level)
+		$C.stroke()
+
+		$C.opacity(0.9)
+		$C.line_width(Zoom.width/Cartagen.zoom_level)
+		$C.stroke_style('white')
+		$C.line_cap('square')
+		$C.begin_path()
+			$C.line_to(x,y)
+			$C.line_to(x,y+(Cartagen.zoom_level*Glop.height*Zoom.height)/Cartagen.zoom_level)
+		$C.stroke()
+
+		$C.restore()
+		
+	}
+	
+}
+
+document.observe('cartagen:init', Zoom.initialize.bindAsEventListener(Zoom))
\ No newline at end of file

{'commit': "diff --git a/cartagen/public/cartagen/src/interface/zoom.js b/cartagen/public/cartagen/src/interface/zoom.js\nnew file mode 100644\nindex 0000000..1f3a928\n--- /dev/null\n+++ b/cartagen/public/cartagen/src/interface/zoom.js\n@@ -0,0 +1,42 @@\n+/**\n+ * @namespace Provides a non-scrollwheel zooming interface\n+ */\n+var Zoom = {\n+\tinitialize: function() {\n+\t\t$('canvas').observe('cartagen:postdraw', Zoom.draw.bindAsEventListener(this))\n+\t},\n+\tzoom_to: function() {\n+\t\t\n+\t},\n+\twidth: 20,\n+\theight:0.4,\n+\tdraw: function() {\n+\t\t\n+\t\t// Glop.height*0.3\n+\t\t$l('hey')\n+\t\t$C.save()\n+\t\t$C.fill_style('white')\n+\t\t$C.line_width(Zoom.width/Cartagen.zoom_level)\n+\t\t$C.opacity(0.7)\n+\t\tvar x = Map.x-(1/Cartagen.zoom_level*(Glop.width/2))+(40/Cartagen.zoom_level), y = Map.y-(1/Cartagen.zoom_level*(Glop.height/2))+(40/Cartagen.zoom_level)\n+\t\t$C.begin_path()\n+\t\t\t$C.line_to(x,y)\n+\t\t\t$C.line_to(x,y+(Glop.height*Zoom.height)/Cartagen.zoom_level)\n+\t\t$C.stroke()\n+\n+\t\t$C.opacity(0.9)\n+\t\t$C.line_width(Zoom.width/Cartagen.zoom_level)\n+\t\t$C.stroke_style('white')\n+\t\t$C.line_cap('square')\n+\t\t$C.begin_path()\n+\t\t\t$C.line_to(x,y)\n+\t\t\t$C.line_to(x,y+(Cartagen.zoom_level*Glop.height*Zoom.height)/Cartagen.zoom_level)\n+\t\t$C.stroke()\n+\n+\t\t$C.restore()\n+\t\t\n+\t}\n+\t\n+}\n+\n+document.observe('cartagen:init', Zoom.initialize.bindAsEventListener(Zoom))\n\\ No newline at end of file\n", 'commit_subject': 'zoom without scrollwheel... just started, v0.7', 'repo_name': 'jywarren/cartagen', 'committer': {'name': 'jywarren', 'email': '555d01dd6a3cfa120592c8119636372ed95158e4@mit.edu', 'time_sec': '1248899501', 'tz_offset': '0', 'date': {'seconds': '1248899501'}}, 'commit_tree': 'ddef6b92b030b2f2178377f867b850cfe98166cb', 'commit_message': 'zoom without scrollwheel... just started, v0.7\n', 'language_name': 'PHP', 'license': 'mit', 'hunks': "@@ -0,0 +1,42 @@\n+/**\n+ * @namespace Provides a non-scrollwheel zooming interface\n+ */\n+var Zoom = {\n+\tinitialize: function() {\n+\t\t$('canvas').observe('cartagen:postdraw', Zoom.draw.bindAsEventListener(this))\n+\t},\n+\tzoom_to: function() {\n+\t\t\n+\t},\n+\twidth: 20,\n+\theight:0.4,\n+\tdraw: function() {\n+\t\t\n+\t\t// Glop.height*0.3\n+\t\t$l('hey')\n+\t\t$C.save()\n+\t\t$C.fill_style('white')\n+\t\t$C.line_width(Zoom.width/Cartagen.zoom_level)\n+\t\t$C.opacity(0.7)\n+\t\tvar x = Map.x-(1/Cartagen.zoom_level*(Glop.width/2))+(40/Cartagen.zoom_level), y = Map.y-(1/Cartagen.zoom_level*(Glop.height/2))+(40/Cartagen.zoom_level)\n+\t\t$C.begin_path()\n+\t\t\t$C.line_to(x,y)\n+\t\t\t$C.line_to(x,y+(Glop.height*Zoom.height)/Cartagen.zoom_level)\n+\t\t$C.stroke()\n+\n+\t\t$C.opacity(0.9)\n+\t\t$C.line_width(Zoom.width/Cartagen.zoom_level)\n+\t\t$C.stroke_style('white')\n+\t\t$C.line_cap('square')\n+\t\t$C.begin_path()\n+\t\t\t$C.line_to(x,y)\n+\t\t\t$C.line_to(x,y+(Cartagen.zoom_level*Glop.height*Zoom.height)/Cartagen.zoom_level)\n+\t\t$C.stroke()\n+\n+\t\t$C.restore()\n+\t\t\n+\t}\n+\t\n+}\n+\n+document.observe('cartagen:init', Zoom.initialize.bindAsEventListener(Zoom))\n\\ No newline at end of file\n", 'addition_count': 42, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/cartagen/public/cartagen/src/interface/zoom.js', 'file_extension': '.js', 'before_file': 'ADDFILE', 'message': 'zoom without scrollwheel... just started, v0.7\n', 'author_name': 'jywarren', 'lang': 'js'}