diff annotator_files/lib/widget.js @ 4:6979313586cf

new version of annotator.
author casties
date Mon, 27 Aug 2012 19:05:38 +0200
parents 6356e78ccf5c
children
line wrap: on
line diff
--- a/annotator_files/lib/widget.js	Thu Apr 05 19:37:27 2012 +0200
+++ b/annotator_files/lib/widget.js	Mon Aug 27 19:05:38 2012 +0200
@@ -1,5 +1,6 @@
-var __hasProp = Object.prototype.hasOwnProperty,
-  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
+// Generated by CoffeeScript 1.3.3
+var __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
 
 Annotator.Widget = (function(_super) {
 
@@ -32,8 +33,12 @@
       top: offset.top,
       right: offset.left + widget.width()
     };
-    if ((current.top - viewport.top) < 0) this.invertY();
-    if ((current.right - viewport.right) > 0) this.invertX();
+    if ((current.top - viewport.top) < 0) {
+      this.invertY();
+    }
+    if ((current.right - viewport.right) > 0) {
+      this.invertX();
+    }
     return this;
   };