[the-board] [ui] Add "area" getter to Thing



commit f77709254c9f6d5a00d5f36ccb86442630ad045e
Author: Lucas Rocha <lucasr gnome org>
Date:   Fri Jan 14 01:03:51 2011 +0000

    [ui] Add "area" getter to Thing

 src/js/ui/thing.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/js/ui/thing.js b/src/js/ui/thing.js
index c783a50..ec32fb5 100644
--- a/src/js/ui/thing.js
+++ b/src/js/ui/thing.js
@@ -476,6 +476,13 @@ Thing.prototype = {
         this._updateControls();
     },
 
+    get area() {
+        return { x1: this._mainBox.x,
+                 y1: this._mainBox.y,
+                 x2: this._mainBox.x + this._mainBox.width,
+                 y2: this._mainBox.y + this._mainBox.height };
+    },
+
     get actor() {
         return this._mainBox;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]