From d6c427432bd0040b084b854407e9ed59a6707b54 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 15 Jun 2012 15:00:06 -0700 Subject: Objects Tray - Add objects tray to binding view --- js/panels/objects/object.reel/object.css | 9 ++--- js/stage/binding-view.reel/binding-view.css | 11 ++++++ js/stage/binding-view.reel/binding-view.html | 25 +++--------- js/stage/objects-tray.reel/objects-tray.css | 33 ++++++++++++++++ js/stage/objects-tray.reel/objects-tray.html | 58 ++++++++++++++++++++++++++++ js/stage/objects-tray.reel/objects-tray.js | 53 +++++++++++++++++++++++++ 6 files changed, 165 insertions(+), 24 deletions(-) create mode 100644 js/stage/objects-tray.reel/objects-tray.css create mode 100644 js/stage/objects-tray.reel/objects-tray.html create mode 100644 js/stage/objects-tray.reel/objects-tray.js (limited to 'js') diff --git a/js/panels/objects/object.reel/object.css b/js/panels/objects/object.reel/object.css index 64b2dbcc..f090ade6 100644 --- a/js/panels/objects/object.reel/object.css +++ b/js/panels/objects/object.reel/object.css @@ -22,7 +22,7 @@ .objects-list .list-item { list-style-type: none; float: left; - width: 80px; + width: 70px; overflow: hidden; text-overflow: ellipsis; } @@ -32,7 +32,7 @@ ------------------- */ .object-icon { - background-color: rgba(0, 0, 0, 0.4); + background-color: rgba(0, 0, 0, 0.6); /* red owner/crate */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACoZJREFUeNqsV2lsHOUZfufYmZ09vF6vE3t9YSc%2ByEWC7YAhbuM0B04TBDVQEGrVVmqpKrUS%2FVOhohQKglYtUlWEkJBKKaWiqG4EciHFMU5iJ8RJnDhOiG878b3rY9d7H7Nz9PkWEgVIaaj4pLFmx%2FN97%2FM%2B7%2FMew9FNrkuXLlE6nSZJkigWi0mZTKbcNM0duC7g2UWn05nYtGkTfdnF%2Fa8Xzp07R3V1ddTf3y8lEonNePSwxWLZL8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BThxDOf4mMhvZES4iY%2BXBITtx9w4AAXrALAJ1tF1RQp%2BAqC4uIRjxaqrq4vOnz8%2FjUH3DxDzawDdj%2F3h6yn%2F7BJv8gsqxubGoaGhIEqvP5NRf15Y6HVlaUIhunChn%2FUEDe2ZCe2PeMxUvvTfvP6yDFxdOvMGaxIZMocZYhMEmsM0MDc3F4D3f8Kn3Et4p%2FcToRlfycfpDRarnquQFdtaWloex3SkHzly5C8o4914PsdS%2BSv9Ov6C5YAeCljzQoawvI7crNfXr%2F8IMADlMDTD%2BOWcSAAAAABJRU5ErkJggg%3D%3D); background-position: center center; @@ -40,7 +40,7 @@ border: 1px solid rgba(0, 0, 0, 0); border-radius: 5px; height: 50px; - margin: 0 15px 5px; + margin: 0 auto 5px; width: 50px; } .object-label { @@ -50,8 +50,7 @@ } .object-icon:hover { - border: 1px solid rgba(0, 0, 0, 0.4); - box-shadow: 0 0 1px 1px #474747; + background-color: rgba(0, 0, 0, 0.4); } .object-icon-component.object-icon { diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css index 7f5de0b8..7ec31edf 100755 --- a/js/stage/binding-view.reel/binding-view.css +++ b/js/stage/binding-view.reel/binding-view.css @@ -5,6 +5,7 @@ */ .bindingView { + height: 100%; position: absolute; width:100%; z-index: 12; @@ -22,4 +23,14 @@ height:100%; position:absolute; z-index: 1; +} + +.objects-tray-container { + bottom: 11px; + position: absolute; + width: 100%; + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-pack: center; + -webkit-box-align: center; } \ No newline at end of file diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html index c7520132..5fb7affd 100755 --- a/js/stage/binding-view.reel/binding-view.html +++ b/js/stage/binding-view.reel/binding-view.html @@ -43,23 +43,10 @@ } ] }, - "nonVisualRepeater": { - "prototype": "montage/ui/repetition.reel", - "properties": { - "element": {"#": "nonVisualRepeater"} - }, - "bindings": { - "objects": {"<-": "@owner.nonVisualComponents"} - } - }, - "objectIcon": { - "prototype": "js/panels/objects/object.reel", + "objectsTray" : { + "prototype": "js/stage/objects-tray.reel", "properties": { - "element": {"#": "nonVisualComponent"} - }, - "bindings": { - "sourceObject": {"<-": "@nonVisualRepeater.objectAtCurrentIteration"}, - "identifier": {"<-": "@nonVisualRepeater.objectAtCurrentIteration.identifier"} + "element": {"#": "objects-tray" } } } } @@ -75,11 +62,11 @@ -
-
-
+
+
+ diff --git a/js/stage/objects-tray.reel/objects-tray.css b/js/stage/objects-tray.reel/objects-tray.css new file mode 100644 index 00000000..422d6a8f --- /dev/null +++ b/js/stage/objects-tray.reel/objects-tray.css @@ -0,0 +1,33 @@ +/* + 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 { + font-size: 11px; + margin: 10px 0 0 0; + padding: 0; + text-shadow: -1px -1px 0 #4D4D4D; +} + +.objects-tray { + background-color: rgba(0,0,0,.6); + border-top-right-radius: 8px; + border-top-left-radius: 8px; + box-shadow: inset 0 0 3px #333; + padding: 0 10px 5px; + margin: 0 auto; + overflow: hidden; + -webkit-box-flex: 0; +} \ No newline at end of file diff --git a/js/stage/objects-tray.reel/objects-tray.html b/js/stage/objects-tray.reel/objects-tray.html new file mode 100644 index 00000000..0fece3fe --- /dev/null +++ b/js/stage/objects-tray.reel/objects-tray.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + +
+ +
+ + + diff --git a/js/stage/objects-tray.reel/objects-tray.js b/js/stage/objects-tray.reel/objects-tray.js new file mode 100644 index 00000000..ee1ecd06 --- /dev/null +++ b/js/stage/objects-tray.reel/objects-tray.js @@ -0,0 +1,53 @@ +/* + 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.ObjectsTray = Montage.create(Component, { + _objects: { value: null }, + objects: { + get: function() { + return this._objects; + }, + set: function(value) { + this._objects = value; + this.needsDraw = true; + } + }, + + + templateDidLoad: { + value: function() { + console.log('objects panel loaded'); + } + }, + + prepareForDraw : { + value: function() { + + Object.defineBinding(this, 'objects', { + "boundObject": this.application.ninja.objectsController, + "boundObjectPropertyPath": "objects", + "oneway": true + }); + + } + }, + draw : { + value: function() { + console.log("objects panel draw"); + if(this.objects) { + + } + } + } + +}); \ No newline at end of file -- cgit v1.2.3 From c7b5f04d41f54ccabfb385a02c47f131383797d8 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 15 Jun 2012 15:06:05 -0700 Subject: Objects Panel - removed for now --- js/data/panels-data.js | 27 ++++++++++++----------- js/panels/PanelContainer.reel/PanelContainer.html | 14 +----------- 2 files changed, 15 insertions(+), 26 deletions(-) (limited to 'js') diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 6792aa51..fd83d0c7 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -125,20 +125,21 @@ exports.PanelsData = Montage.create(Montage, { open: true, modulePath: "js/panels/binding-panel.reel", moduleName: "BindingPanel" - }, - { - name: "Objects", - groups: ["ws-binding"], - minHeight: 100, - height: 100, - maxHeight: null, - flexible: true, - collapsed: true, - scrollable: true, - open: true, - modulePath: "js/panels/objects/objects-panel.reel", - moduleName: "ObjectsPanel" } +// , +// { +// name: "Objects", +// groups: ["ws-binding"], +// minHeight: 100, +// height: 100, +// maxHeight: null, +// flexible: true, +// collapsed: true, +// scrollable: true, +// open: true, +// modulePath: "js/panels/objects/objects-panel.reel", +// moduleName: "ObjectsPanel" +// } ] } diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index 9842a1d1..ed6e8463 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html @@ -94,16 +94,6 @@ } }, - "panel_8": { - "prototype": "js/panels/Panel.reel", - "properties": { - "element": {"#": "panel_8"} - }, - "bindings": { - "currentDocument": {"<-": "@owner.currentDocument"} - } - }, - "owner": { "prototype": "js/panels/PanelContainer.reel", "properties": { @@ -116,8 +106,7 @@ "panel_4": {"@": "panel_4"}, "panel_5": {"@": "panel_5"}, "panel_6": {"@": "panel_6"}, - "panel_7": {"@": "panel_7"}, - "panel_8": {"@": "panel_8"} + "panel_7": {"@": "panel_7"} }, "listeners": [ { @@ -149,7 +138,6 @@
-
-- cgit v1.2.3