From a40184e08a7ee2f189f133fd7bd83480e4bfc7f2 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Wed, 16 May 2012 22:19:34 -0700
Subject: Objects Panel - Add object component
---
js/panels/objects/object.reel/object.css | 28 +++++++++
js/panels/objects/object.reel/object.html | 47 ++++++++++++++
js/panels/objects/object.reel/object.js | 101 ++++++++++++++++++++++++++++++
3 files changed, 176 insertions(+)
create mode 100644 js/panels/objects/object.reel/object.css
create mode 100644 js/panels/objects/object.reel/object.html
create mode 100644 js/panels/objects/object.reel/object.js
(limited to 'js/panels/objects/object.reel')
diff --git a/js/panels/objects/object.reel/object.css b/js/panels/objects/object.reel/object.css
new file mode 100644
index 00000000..6ca759ba
--- /dev/null
+++ b/js/panels/objects/object.reel/object.css
@@ -0,0 +1,28 @@
+/*
+ This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
+ */
+
+/*
+
+
+
+*/
+
+.objects-list {
+ margin: 0;
+ padding: 0;
+}
+.objects-list list-item {
+ width: 200px;
+ height: 200px;
+ float: left;
+ margin: 0 18px 18px;
+ border-radius: 20px;
+ box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
+}
\ No newline at end of file
diff --git a/js/panels/objects/object.reel/object.html b/js/panels/objects/object.reel/object.html
new file mode 100644
index 00000000..efc66d79
--- /dev/null
+++ b/js/panels/objects/object.reel/object.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js
new file mode 100644
index 00000000..953c1baf
--- /dev/null
+++ b/js/panels/objects/object.reel/object.js
@@ -0,0 +1,101 @@
+/*
+ This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
+ */
+
+/**
+ @requires montage/core/core
+ @requires montage/ui/component
+ */
+var Montage = require("montage/core/core").Montage,
+ Component = require("montage/ui/component").Component;
+
+exports.Object = Montage.create(Component, {
+ _needsPropertyInspection : { value: null },
+
+ _sourceObject : { value: null },
+ sourceObject : {
+ get: function() {
+ return this._sourceObject;
+ },
+ set: function(object) {
+ if(this._sourceObject === object) { return false; }
+
+ if(object._montage_metadata) {
+ this.montageMetaData = object._montage_metadata;
+ }
+
+ this._needsPropertyInspection = this.needsDraw = true;
+ }
+
+ },
+
+ _identifier : {
+ value: null
+ },
+ identifier : {
+ get: function() {
+ return this._identifier;
+ },
+ set: function(value) {
+ if(this._identifier === value || !value) { return false; }
+
+ this._identifier = value;
+
+ this.label = value;
+
+ this.needsDraw = true;
+ }
+
+ },
+
+ _montageMetaData : {
+ value: null
+ },
+ montageMetaData : {
+ get: function() {
+ return this._montageLabel;
+ },
+ set: function(value) {
+ if(this._montageMetaData === value) { return false; }
+
+ this._montageMetaData = value;
+
+ if(!this.identifier && value.label) {
+ this.label = value.label;
+ this.needsDraw = true;
+ }
+ }
+
+ },
+
+ templateDidLoad: {
+ value: function() {
+ console.log('object loaded');
+ }
+ },
+
+ prepareForDraw : {
+ value: function() {
+
+ }
+ },
+
+ willDraw : {
+ value: function() {
+ if(this._needsPropertyInspection) {
+
+ }
+
+ console.log("This label ", this.label);
+ }
+ },
+
+ draw : {
+ value: function() {
+
+ }
+ }
+
+});
\ No newline at end of file
--
cgit v1.2.3