http://code.google.com/p/canviz/source/detail?r=354
Modified:
/path/trunk/src/Bezier.js
/path/trunk/src/Ellipse.js
/path/trunk/src/Path.js
/path/trunk/src/Point.js
/path/trunk/src/Polygon.js
/path/trunk/src/Rect.js
/path/trunk/src/all.js
=======================================
--- /path/trunk/src/Bezier.js Tue Jan 31 13:29:54 2012
+++ /path/trunk/src/Bezier.js Tue Jan 31 17:30:29 2012
@@ -1,7 +1,7 @@
//#include 'Point.js'
//#include 'Rect.js'
-function Bezier(points) {
+var Bezier = exports.Bezier = function(points) {
this.points = points;
this.order = points.length;
};
=======================================
--- /path/trunk/src/Ellipse.js Tue Jan 31 13:29:54 2012
+++ /path/trunk/src/Ellipse.js Tue Jan 31 17:30:29 2012
@@ -1,7 +1,7 @@
//#include 'Path.js'
//#include 'Point.js'
-function Ellipse(cx, cy, rx, ry, options) {
+var Ellipse = exports.Ellipse = function(cx, cy, rx, ry, options) {
this.cx = cx; // center x
this.cy = cy; // center y
this.rx = rx; // radius x
=======================================
--- /path/trunk/src/Path.js Tue Jan 31 13:29:54 2012
+++ /path/trunk/src/Path.js Tue Jan 31 17:30:29 2012
@@ -1,7 +1,7 @@
//#include 'Bezier.js'
//#include 'Rect.js'
-function Path(segments, options) {
+var Path = exports.Path = function(segments, options) {
this.segments = segments || [];
this.options = {};
if (options) this.setOptions(options);
=======================================
--- /path/trunk/src/Point.js Fri Dec 23 06:08:31 2011
+++ /path/trunk/src/Point.js Tue Jan 31 17:30:29 2012
@@ -1,4 +1,4 @@
-function Point(x, y) {
+var Point = exports.Point = function(x, y) {
this.x = x;
this.y = y;
};
=======================================
--- /path/trunk/src/Polygon.js Tue Jan 31 13:29:54 2012
+++ /path/trunk/src/Polygon.js Tue Jan 31 17:30:29 2012
@@ -1,6 +1,6 @@
//#include 'Path.js'
-function Polygon(points, options) {
+var Polygon = exports.Polygon = function(points, options) {
this.points = points || [];
Path.call(this, [], options);
};
=======================================
--- /path/trunk/src/Rect.js Tue Jan 31 13:29:54 2012
+++ /path/trunk/src/Rect.js Tue Jan 31 17:30:29 2012
@@ -1,7 +1,7 @@
//#include 'Point.js'
//#include 'Polygon.js'
-function Rect(l, t, r, b, options) {
+var Rect = exports.Rect = function(l, t, r, b, options) {
this.l = l;
this.t = t;
this.r = r;
=======================================
--- /path/trunk/src/all.js Tue Jan 31 13:29:54 2012
+++ /path/trunk/src/all.js Tue Jan 31 17:30:29 2012
@@ -1,6 +1,10 @@
+(function(exports) {
+
//#include 'Bezier.js'
//#include 'Ellipse.js'
//#include 'Path.js'
//#include 'Point.js'
//#include 'Polygon.js'
//#include 'Rect.js'
+
+}('undefined' !== typeof exports ? exports : window));