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 +++++++++++++++++++++ .../objects/objects-panel.reel/objects-panel.css | 37 ++++++++ .../objects/objects-panel.reel/objects-panel.html | 70 ++++++++++++++ .../objects/objects-panel.reel/objects-panel.js | 53 +++++++++++ 6 files changed, 336 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 create mode 100644 js/panels/objects/objects-panel.reel/objects-panel.css create mode 100644 js/panels/objects/objects-panel.reel/objects-panel.html create mode 100644 js/panels/objects/objects-panel.reel/objects-panel.js (limited to 'js/panels/objects') 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 diff --git a/js/panels/objects/objects-panel.reel/objects-panel.css b/js/panels/objects/objects-panel.reel/objects-panel.css new file mode 100644 index 00000000..3fa3c479 --- /dev/null +++ b/js/panels/objects/objects-panel.reel/objects-panel.css @@ -0,0 +1,37 @@ +/* + 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: 10px 0 0 0; + padding: 0; +} +.objects-list .list-item { + list-style-type: none; + float: left; +} +.object-icon { + background-color: #fff; + border: 1px solid #353535; + border-radius: 5px; + height: 50px; + margin: 0 15px 5px; + width: 50px; +} +.object-label { + color: #fff; + display: block; + text-align: center; +} \ No newline at end of file diff --git a/js/panels/objects/objects-panel.reel/objects-panel.html b/js/panels/objects/objects-panel.reel/objects-panel.html new file mode 100644 index 00000000..d68a59c0 --- /dev/null +++ b/js/panels/objects/objects-panel.reel/objects-panel.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + + +
    + +
    + + + diff --git a/js/panels/objects/objects-panel.reel/objects-panel.js b/js/panels/objects/objects-panel.reel/objects-panel.js new file mode 100644 index 00000000..a1c381a2 --- /dev/null +++ b/js/panels/objects/objects-panel.reel/objects-panel.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.ObjectsPanel = 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 dad4e3aa51b9f2b370f20f13bdb00ccc33f8d891 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 25 May 2012 16:34:52 -0700 Subject: Object component - Minor cleanup --- js/panels/objects/object.reel/object.js | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js index 953c1baf..43abafad 100644 --- a/js/panels/objects/object.reel/object.js +++ b/js/panels/objects/object.reel/object.js @@ -57,41 +57,19 @@ exports.Object = Montage.create(Component, { get: function() { return this._montageLabel; }, - set: function(value) { - if(this._montageMetaData === value) { return false; } + set: function(data) { + if(this._montageMetaData === data) { return false; } - this._montageMetaData = value; + this._montageMetaData = data; - if(!this.identifier && value.label) { - this.label = value.label; + if(!this.identifier && data.label) { + this.label = data.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() { -- cgit v1.2.3 From 1be5495b77c1dd426be3a6be05555254856de6ba Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 25 May 2012 16:35:17 -0700 Subject: Object Component - Enable native dragging --- js/panels/objects/object.reel/object.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.html b/js/panels/objects/object.reel/object.html index efc66d79..a072ab5e 100644 --- a/js/panels/objects/object.reel/object.html +++ b/js/panels/objects/object.reel/object.html @@ -38,7 +38,7 @@ -
  • +
  • -- cgit v1.2.3 From a9a6d479e4f00134b32f7c3e657de3ce5cfb0c48 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 11 Jun 2012 10:27:49 -0700 Subject: Objects Panel - Add component icon and icons by type --- js/panels/objects/object.reel/object.js | 30 ++++++++++++++++++++++ .../objects/objects-panel.reel/objects-panel.css | 24 +++++++++++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js index 43abafad..1e33b7f7 100644 --- a/js/panels/objects/object.reel/object.js +++ b/js/panels/objects/object.reel/object.js @@ -13,6 +13,16 @@ var Montage = require("montage/core/core").Montage, exports.Object = Montage.create(Component, { _needsPropertyInspection : { value: null }, + type: { value: null }, + getType : { + value: function() { + if(this._hasPrototype(this.sourceObject, 'Component')) { + return 'Component'; + } + + return null; + } + }, _sourceObject : { value: null }, sourceObject : { @@ -22,8 +32,11 @@ exports.Object = Montage.create(Component, { set: function(object) { if(this._sourceObject === object) { return false; } + this._sourceObject = object; + if(object._montage_metadata) { this.montageMetaData = object._montage_metadata; + this.type = this.getType(); } this._needsPropertyInspection = this.needsDraw = true; @@ -70,8 +83,25 @@ exports.Object = Montage.create(Component, { }, + _hasPrototype : { + value: function(object, prototypeName) { + var prototypes = this.application.ninja.objectsController.getPrototypes(object).map(function(proto) { + var metadata = proto._montage_metadata; + return (metadata) ? metadata.objectName : "Object"; + }); + + return prototypes.indexOf(prototypeName) !== -1; + } + }, + draw : { value: function() { + if(this.type) { + this.element.classList.add('object-icon-'+this.type.toLowerCase()); + } else{ + this.element.classList.add('object-icon-default'); + } + } } diff --git a/js/panels/objects/objects-panel.reel/objects-panel.css b/js/panels/objects/objects-panel.reel/objects-panel.css index 3fa3c479..59bee214 100644 --- a/js/panels/objects/objects-panel.reel/objects-panel.css +++ b/js/panels/objects/objects-panel.reel/objects-panel.css @@ -21,10 +21,21 @@ .objects-list .list-item { list-style-type: none; float: left; + width: 80px; + overflow: hidden; + text-overflow: ellipsis; } + +/* ------------------ + Icon Styles + ------------------- */ + .object-icon { - background-color: #fff; - border: 1px solid #353535; + background-color: rgba(0, 0, 0, 0.4); + /* red owner/crate */ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACoZJREFUeNqsV2lsHOUZfufYmZ09vF6vE3t9YSc%2ByEWC7YAhbuM0B04TBDVQEGrVVmqpKrUS%2FVOhohQK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q4fjGBRbBhFhsvY75bCyYKPJ58DmO2cscdd1bDawEFRWIaAAvxoua9Jfe3tGxHk7FMXJ6g3jNnDMT6o46OjucR0rdx3giuxGcNCV8wsjOUcdSGeYhzEKEpQMzLoQu%2BoqIcmCQJdGanm9raWvf2pqZVmIK4k%2FD63LmziePHj7eeOnXqBThxDOf4mMhvZES4iY%2BXBITtx9w4AAXrALAJ1tF1RQp%2BAqC4uIRjxaqrq4vOnz8%2FjUH3DxDzawDdj%2F3h6yn%2F7BJv8gsqxubGoaGhIEqvP5NRf15Y6HVlaUIhunChn%2FUEDe2ZCe2PeMxUvvTfvP6yDFxdOvMGaxIZMocZYhMEmsM0MDc3F4D3f8Kn3Et4p%2FcToRlfycfpDRarnquQFdtaWloex3SkHzly5C8o4914PsdS%2BSv9Ov6C5YAeCljzQoawvI7crNfXr%2F8IMADlMDTD%2BOWcSAAAAABJRU5ErkJggg%3D%3D); + background-position: center center; + background-repeat: no-repeat; border-radius: 5px; height: 50px; margin: 0 15px 5px; @@ -34,4 +45,13 @@ color: #fff; display: block; text-align: center; +} + +.object-icon:hover { + background-color: rgba(0, 0, 0, 0.2); +} + +.object-icon-component .object-icon { + /* gray gear */ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAACE5JREFUWIWdV2tsHNUV%2Fu6989iHd9frtVeJsUNsEW8AOYSkTUgs9SVKoahSUdpKSC0toBapSEhBVuFPsOxfFInSP6hCgoigVhS1IFVtgKBKaaIoxBFOChF1bceubRI7btbe3cyOZ%2BbOffRHPKP1I63cK11p5%2BzMOd853znnnkuwyTUwMIBSqdTKGOswTTOjtUYYho7jOFcmJibKL7300qb0GZsFQClNbN%2B%2B%2FWhXV9f9ACwA0FrzycnJv83NzR0C4G1K32YBSCltAD25XC6Zy%2BVYLpdjzc3NScZYDyHEbny3v7%2F%2Ff%2BrbMAJDQ0NwXbdg2%2FY%2Bx3E%2BfOWVV3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cXL7mu%2B8mGFADA6dOnvYMHD36czWa%2FkUgkWimlGoCqVqsfCyGqlmW10oZ5vBHYSg5oKaWq1Wr%2FcBxn3LKs27TWRGtNHMeZmJqaerS%2Fv%2F9ftwQAAHv27Pm3lPJUOp0%2BkEqltszOzr7x%2BeefP1Eul4%2B5rntRKZVJJpNdjDHaCEAIoRYWFv46PT39wtTU1Auzs7O%2FY4zl8%2Fn8lyqVymdTU1OPzs%2FPf3bq1KlV9jYebwAMDg625vP5fTMzMx%2B8%2FPLL8SExMDDQ2tfXd7G9vb2j8f25ublrw8PDu44cORJfQJ5%2B%2BmlSKpUerNVqnzTKG9ct74YDAwNlAO%2BvlQdBEEopl9fmhZTSC4JANMpeffVVDeCDW9kA%2Fo%2B74eLiIvc8bzYMw0ApJbXWMgzDwPO8maWlJb5ZfZu%2BHS8tLXkXLlz44RdffHFbcmUu9zzPu379%2BtVyuexuVt9%2FAKVP%2BiORVHX0AAAAAElFTkSuQmCC); } \ No newline at end of file -- cgit v1.2.3 From d6b46ba496c9c8974ae39bb476aea35bcd1ddaf1 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 11 Jun 2012 13:27:17 -0700 Subject: Objects Panel - CSS and serialization update --- js/panels/objects/object.reel/object.css | 44 +++++++++++++++++++--- .../objects/objects-panel.reel/objects-panel.css | 37 ------------------ .../objects/objects-panel.reel/objects-panel.html | 18 ++------- 3 files changed, 41 insertions(+), 58 deletions(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.css b/js/panels/objects/object.reel/object.css index 6ca759ba..2612c392 100644 --- a/js/panels/objects/object.reel/object.css +++ b/js/panels/objects/object.reel/object.css @@ -18,11 +18,43 @@ margin: 0; padding: 0; } -.objects-list list-item { - width: 200px; - height: 200px; + +.objects-list .list-item { + list-style-type: none; float: left; - margin: 0 18px 18px; - border-radius: 20px; - box-shadow: inset 0 0 4px rgba(0,0,0,0.5); + width: 80px; + overflow: hidden; + text-overflow: ellipsis; +} + +/* ------------------ + Icon Styles + ------------------- */ + +.object-icon { + background-color: rgba(0, 0, 0, 0.4); + /* red owner/crate */ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACoZJREFUeNqsV2lsHOUZfufYmZ09vF6vE3t9YSc%2ByEWC7YAhbuM0B04TBDVQEGrVVmqpKrUS%2FVOhohQKglYtUlWEkJBKKaWiqG4EciHFMU5iJ8RJnDhOiG878b3rY9d7H7Nz9PkWEgVIaaj4pLFmx%2FN97%2FM%2B7%2FMew9FNrkuXLlE6nSZJkigWi0mZTKbcNM0duC7g2UWn05nYtGkTfdnF%2Fa8Xzp07R3V1ddTf3y8lEonNePSwxWLZL8tyhdVqlTRN0wFoBoBadV3%2FW15e3qWNGzca%2FzeAy5cv05o1a7L3MGpVVfUujuO%2BI4riHhgstNlsImMBnmffYfdsJZNJikQiKkAOAczreP8tvOsDmJsDMDw8zKgleMenUqmd8Oandru9EUZzFUXhBUEgHEzxeJxC4XBSDIf1glTKEXe7TaWsTIUxGXsJewmg2VlJAOozDOP53Nzc9xGeG7LCHT58mHlRAEP7YORR3N%2BNS7HZ7MSMJpOJbOwjoXAyfapnpOTI0c7yo0eXp3fs%2BKGluHhtLJXWi%2Fv7nvU9%2BaQ1Vln17TxPXrliVXjT%2FNgeQBBYiYKh9xGuV8BcD2wlGhoaPgbQ1tbGA%2FGRqqqq7UBKPC9kvUilUxSPxZPxySsD7rffuVDd%2Fn7cHovp49%2FY%2FU3B41kdzWRExNsZzagkx2ILVkkSuODKIbO%2B7uTSAy37wMYOl8vl4MAxC5eqZigcDhlgZh5MvgdAr0Sj0fNcZ2cnzczMHKqurt6LDQQ1E5DS4uJiALH%2FSf22bbmLW2ofUSurbxNCQd%2BUy7VxtdPBZXSDVn19Oy0d7yYLQHNkUGA5EL5FtkYRxxCvZV4MPPUrN5x5TFGsFQgnj7Bmw7i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G%2FX5%2FDL9vgybk6qoqfs%2BePV6wJ%2Fy598zCuKzEy0pLFEHgLaweQD%2FxaEd7omBiorfTZuu67YknmnY2N38NPUO6ePEiHTt2TIPho7h%2BGwgEDuNcVgXNGwHIMoFrGU1lDJvHMSHVZTKak80HtXW1hZVrK6V%2Ftb3TWVVVWYFh1cYYQBsfSHZ2dkw038P%2F4MCBH23dutWbQM%2FoOXmSuru7%2Fe3t7S%2BPj4%2B%2FDB30XKX%2BRhq4fjGBRbBhFhsvY75bCyYKPJ58DmO2cscdd1bDawEFRWIaAAvxoua9Jfe3tGxHk7FMXJ6g3jNnDMT6o46OjucR0rdx3giuxGcNCV8wsjOUcdSGeYhzEKEpQMzLoQu%2BoqIcmCQJdGanm9raWvf2pqZVmIK4k%2FD63LmziePHj7eeOnXqBThxDOf4mMhvZES4iY%2BXBITtx9w4AAXrALAJ1tF1RQp%2BAqC4uIRjxaqrq4vOnz8%2FjUH3DxDzawDdj%2F3h6yn%2F7BJv8gsqxubGoaGhIEqvP5NRf15Y6HVlaUIhunChn%2FUEDe2ZCe2PeMxUvvTfvP6yDFxdOvMGaxIZMocZYhMEmsM0MDc3F4D3f8Kn3Et4p%2FcToRlfycfpDRarnquQFdtaWloex3SkHzly5C8o4914PsdS%2BSv9Ov6C5YAeCljzQoawvI7crNfXr%2F8IMADlMDTD%2BOWcSAAAAABJRU5ErkJggg%3D%3D); + background-position: center center; + background-repeat: no-repeat; + border: 1px solid rgba(0, 0, 0, 0); + border-radius: 5px; + height: 50px; + margin: 0 15px 5px; + width: 50px; +} +.object-label { + color: #fff; + display: block; + text-align: center; +} + +.object-icon:hover { + border: 1px solid rgba(0, 0, 0, 0.4); + box-shadow: 0 0 1px 1px #474747; +} + +.object-icon-component .object-icon { + /* gray gear */ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAACE5JREFUWIWdV2tsHNUV%2Fu6989iHd9frtVeJsU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2gVquVs9ls3Mk8z4Nt20in03BdN87wyOsILACkUikwxhCGIUzTjI9y13XLrusGawHEp%2BHhw4ehlMLdd9%2F9q46OjkcAUEIIKKUwDAOMMdi2jZaWltiI1hqEEJimiWQyiWQyCa01onmCEBL%2Fbmpqarcsq6W7u%2Fv42bNn1wM4d%2B4cHn744W%2Fu37%2F%2F14wxFnkY7ZVzIA6rZVlIpVKwbRuMsXX13dg%2FVhoZaWtr27u0tHT%2Bo48%2BurxhDnDOL1Qqlb%2Bv8BZtvfYIjnLD9334vh%2F3%2FZWt19b%2BytxAFhcXL7mu%2B8mGFADA6dOnvYMHD36czWa%2FkUgkWimlGoCqVqsfCyGqlmW10oZ5vBHYSg5oKaWq1Wr%2FcBxn3LKs27TWRGtNHMeZmJqaerS%2Fv%2F9ftwQAAHv27Pm3lPJUOp0%2BkEqltszOzr7x%2BeefP1Eul4%2B5rntRKZVJJpNdjDHaCEAIoRYWFv46PT39wtTU1Auzs7O%2FY4zl8%2Fn8lyqVymdTU1OPzs%2FPf3bq1KlV9jYebwAMDg625vP5fTMzMx%2B8%2FPLL8SExMDDQ2tfXd7G9vb2j8f25ublrw8PDu44cORJfQJ5%2B%2BmlSKpUerNVqnzTKG9ct74YDAwNlAO%2BvlQdBEEopl9fmhZTSC4JANMpeffVVDeCDW9kA%2Fo%2B74eLiIvc8bzYMw0ApJbXWMgzDwPO8maWlJb5ZfZu%2BHS8tLXkXLlz44RdffHFbcmUu9zzPu379%2BtVyuexuVt9%2FAKVP%2BiORVHX0AAAAAElFTkSuQmCC); } \ No newline at end of file diff --git a/js/panels/objects/objects-panel.reel/objects-panel.css b/js/panels/objects/objects-panel.reel/objects-panel.css index 59bee214..3a83776e 100644 --- a/js/panels/objects/objects-panel.reel/objects-panel.css +++ b/js/panels/objects/objects-panel.reel/objects-panel.css @@ -18,40 +18,3 @@ margin: 10px 0 0 0; padding: 0; } -.objects-list .list-item { - list-style-type: none; - float: left; - width: 80px; - overflow: hidden; - text-overflow: ellipsis; -} - -/* ------------------ - Icon Styles - ------------------- */ - -.object-icon { - background-color: rgba(0, 0, 0, 0.4); - /* red owner/crate */ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACoZJREFUeNqsV2lsHOUZfufYmZ09vF6vE3t9YSc%2ByEWC7YAhbuM0B04TBDVQEGrVVmqpKrUS%2FVOhohQKglYtUlWEkJBKKaWiqG4EciHFMU5iJ8RJnDhOiG878b3rY9d7H7Nz9PkWEgVIaaj4pLFmx%2FN97%2FM%2B7%2FMew9FNrkuXLlE6nSZJkigWi0mZTKbcNM0duC7g2UWn05nYtGkTfdnF%2Fa8Xzp07R3V1ddTf3y8lEonNePSwxWLZL8tyhdVqlTRN0wFoBoBadV3%2FW15e3qWNGzca%2FzeAy5cv05o1a7L3MGpVVfUujuO%2BI4riHhgstNlsImMBnmffYfdsJZNJikQiKkAOAczreP8tvOsDmJsDMDw8zKgleMenUqmd8Oandru9EUZzFUXhBUEgHEzxeJxC4XBSDIf1glTKEXe7TaWsTIUxGXsJewmg2VlJAOozDOP53Nzc9xGeG7LCHT58mHlRAEP7YORR3N%2BNS7HZ7MSMJpOJbOwjoXAyfapnpOTI0c7yo0eXp3fs%2BKGluHhtLJXWi%2Fv7nvU9%2BaQ1Vln17TxPXrliVXjT%2FNgeQBBYiYKh9xGuV8BcD2wlGhoaPgbQ1tbGA%2FGRqqqq7UBKPC9kvUilUxSPxZPxySsD7rffuVDd%2Fn7cHovp49%2FY%2FU3B41kdzWRExNsZzagkx2ILVkkSuODKIbO%2B7uTSAy37wMYOl8vl4MAxC5eqZigcDhlgZh5MvgdAr0Sj0fNcZ2cnzczMHKqurt6LDQQ1E5DS4uJiALH%2FSf22bbmLW2ofUSurbxNCQd%2BUy7VxtdPBZXSDVn19Oy0d7yYLQHNkUGA5EL5FtkYRxxCvZV4MPPUrN5x5TFGsFQg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AtFSCW0cFG%2FX5%2FDL9vgybk6qoqfs%2BePV6wJ%2Fy598zCuKzEy0pLFEHgLaweQD%2FxaEd7omBiorfTZuu67YknmnY2N38NPUO6ePEiHTt2TIPho7h%2BGwgEDuNcVgXNGwHIMoFrGU1lDJvHMSHVZTKak80HtXW1hZVrK6V%2Ftb3TWVVVWYFh1cYYQBsfSHZ2dkw038P%2F4MCBH23dutWbQM%2FoOXmSuru7%2Fe3t7S%2BPj4%2B%2FDB30XKX%2BRhq4fjGBRbBhFhsvY75bCyYKPJ58DmO2cscdd1bDawEFRWIaAAvxoua9Jfe3tGxHk7FMXJ6g3jNnDMT6o46OjucR0rdx3giuxGcNCV8wsjOUcdSGeYhzEKEpQMzLoQu%2BoqIcmCQJdGanm9raWvf2pqZVmIK4k%2FD63LmziePHj7eeOnXqBThxDOf4mMhvZES4iY%2BXBITtx9w4AAXrALAJ1tF1RQp%2BAqC4uIRjxaqrq4vOnz8%2FjUH3DxDzawDdj%2F3h6yn%2F7BJv8gsqxubGoaGhIEqvP5NRf15Y6HVlaUIhunChn%2FUEDe2ZCe2PeMxUvvTfvP6yDFxdOvMGaxIZMocZYhMEmsM0MDc3F4D3f8Kn3Et4p%2FcToRlfycfpDRarnquQFdtaWloex3SkHzly5C8o4914PsdS%2BSv9Ov6C5YAeCljzQoawvI7crNfXr%2F8IMADlMDTD%2BOWcSAAAAABJRU5ErkJggg%3D%3D); - background-position: center center; - background-repeat: no-repeat; - border-radius: 5px; - height: 50px; - margin: 0 15px 5px; - width: 50px; -} -.object-label { - color: #fff; - display: block; - text-align: center; -} - -.object-icon:hover { - background-color: rgba(0, 0, 0, 0.2); -} - -.object-icon-component .object-icon { - /* gray gear */ - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAACE5JREFUWIWdV2tsHNUV%2Fu6989iHd9frtVeJsUNsEW8AOYSkTUgs9SVKoahSUdpKSC0toBapSEhBVuF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CGIUzTjI9y13XLrusGawHEp%2BHhw4ehlMLdd9%2F9q46OjkcAUEIIKKUwDAOMMdi2jZaWltiI1hqEEJimiWQyiWQyCa01onmCEBL%2Fbmpqarcsq6W7u%2Fv42bNn1wM4d%2B4cHn744W%2Fu37%2F%2F14wxFnkY7ZVzIA6rZVlIpVKwbRuMsXX13dg%2FVhoZaWtr27u0tHT%2Bo48%2BurxhDnDOL1Qqlb%2Bv8BZtvfYIjnLD9334vh%2F3%2FZWt19b%2BytxAFhcXL7mu%2B8mGFADA6dOnvYMHD36czWa%2FkUgkWimlGoCqVqsfCyGqlmW10oZ5vBHYSg5oKaWq1Wr%2FcBxn3LKs27TWRGtNHMeZmJqaerS%2Fv%2F9ftwQAAHv27Pm3lPJUOp0%2BkEqltszOzr7x%2BeefP1Eul4%2B5rntRKZVJJpNdjDHaCEAIoRYWFv46PT39wtTU1Auzs7O%2FY4zl8%2Fn8lyqVymdTU1OPzs%2FPf3bq1KlV9jYebwAMDg625vP5fTMzMx%2B8%2FPLL8SExMDDQ2tfXd7G9vb2j8f25ublrw8PDu44cORJfQJ5%2B%2BmlSKpUerNVqnzTKG9ct74YDAwNlAO%2BvlQdBEEopl9fmhZTSC4JANMpeffVVDeCDW9kA%2Fo%2B74eLiIvc8bzYMw0ApJbXWMgzDwPO8maWlJb5ZfZu%2BHS8tLXkXLlz44RdffHFbcmUu9zzPu379%2BtVyuexuVt9%2FAKVP%2BiORVHX0AAAAAElFTkSuQmCC); -} \ No newline at end of file diff --git a/js/panels/objects/objects-panel.reel/objects-panel.html b/js/panels/objects/objects-panel.reel/objects-panel.html index d68a59c0..17f414e8 100644 --- a/js/panels/objects/objects-panel.reel/objects-panel.html +++ b/js/panels/objects/objects-panel.reel/objects-panel.html @@ -27,11 +27,7 @@ "arrayController": { "prototype": "montage/ui/controller/array-controller", "bindings": { - "content" : { - "boundObject": {"@": "owner"}, - "boundObjectPropertyPath": "objects", - "oneway": true - } + "content": {"<-": "@owner.objects"} } }, "objectComponent": { @@ -40,16 +36,8 @@ "element": {"#": "list-item"} }, "bindings": { - "sourceObject" : { - "boundObject": {"@": "repetition"}, - "boundObjectPropertyPath": "objectAtCurrentIteration", - "oneway": true - }, - "identifier" : { - "boundObject": {"@": "repetition"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.identifier", - "oneway": true - } + "sourceObject" : {"<-": "@repetition.objectAtCurrentIteration"}, + "identifier" : {"<-": "@repetition.objectAtCurrentIteration.identifier"} } } -- cgit v1.2.3 From 3a2b178e93767b6e4f463fbc0a44e4b0d00ceec9 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Wed, 13 Jun 2012 19:07:54 -0700 Subject: Objects Panel - Fix CSS to simplify showing object icons in other panels --- js/panels/objects/object.reel/object.css | 2 +- js/panels/objects/object.reel/object.html | 5 +++-- js/panels/objects/object.reel/object.js | 29 +++++------------------------ 3 files changed, 9 insertions(+), 27 deletions(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.css b/js/panels/objects/object.reel/object.css index 2612c392..64b2dbcc 100644 --- a/js/panels/objects/object.reel/object.css +++ b/js/panels/objects/object.reel/object.css @@ -54,7 +54,7 @@ box-shadow: 0 0 1px 1px #474747; } -.object-icon-component .object-icon { +.object-icon-component.object-icon { /* gray gear */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAACE5JREFUWIWdV2tsHNUV%2Fu6989iHd9frtVeJsUNsEW8AOYSkTUgs9SVKoahSUdpKSC0toBapSEhBVuFPsOxfFInSP6hCgoigVhS1IFVtgKBKaaIoxBFOChF1bceubRI7btbe3cyOZ%2BbOffRHPKP1I63cK11p5%2BzMOd853znnnkuwyTUwMIBSqdTKGOswTTOjtUYYho7jOFcmJibKL7300qb0GZsFQClNbN%2B%2B%2FWhXV9f9ACwA0FrzycnJv83NzR0C4G1K32YBSCltAD25XC6Zy%2BVYLpdjzc3NScZYDyHEbny3v7%2F%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lb%2Bv8BZtvfYIjnLD9334vh%2F3%2FZWt19b%2BytxAFhcXL7mu%2B8mGFADA6dOnvYMHD36czWa%2FkUgkWimlGoCqVqsfCyGqlmW10oZ5vBHYSg5oKaWq1Wr%2FcBxn3LKs27TWRGtNHMeZmJqaerS%2Fv%2F9ftwQAAHv27Pm3lPJUOp0%2BkEqltszOzr7x%2BeefP1Eul4%2B5rntRKZVJJpNdjDHaCEAIoRYWFv46PT39wtTU1Auzs7O%2FY4zl8%2Fn8lyqVymdTU1OPzs%2FPf3bq1KlV9jYebwAMDg625vP5fTMzMx%2B8%2FPLL8SExMDDQ2tfXd7G9vb2j8f25ublrw8PDu44cORJfQJ5%2B%2BmlSKpUerNVqnzTKG9ct74YDAwNlAO%2BvlQdBEEopl9fmhZTSC4JANMpeffVVDeCDW9kA%2Fo%2B74eLiIvc8bzYMw0ApJbXWMgzDwPO8maWlJb5ZfZu%2BHS8tLXkXLlz44RdffHFbcmUu9zzPu379%2BtVyuexuVt9%2FAKVP%2BiORVHX0AAAAAElFTkSuQmCC); } \ No newline at end of file diff --git a/js/panels/objects/object.reel/object.html b/js/panels/objects/object.reel/object.html index a072ab5e..6274f480 100644 --- a/js/panels/objects/object.reel/object.html +++ b/js/panels/objects/object.reel/object.html @@ -14,7 +14,8 @@ "owner": { "prototype": "js/panels/objects/object.reel", "properties": { - "element": {"#": "object"} + "element": {"#": "object"}, + "iconElement": { "#": "object-icon"} } }, "labelText": { @@ -39,7 +40,7 @@
  • -
    +
  • diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js index 1e33b7f7..76f1b5bf 100644 --- a/js/panels/objects/object.reel/object.js +++ b/js/panels/objects/object.reel/object.js @@ -13,16 +13,8 @@ var Montage = require("montage/core/core").Montage, exports.Object = Montage.create(Component, { _needsPropertyInspection : { value: null }, - type: { value: null }, - getType : { - value: function() { - if(this._hasPrototype(this.sourceObject, 'Component')) { - return 'Component'; - } - - return null; - } - }, + iconElement : { value: null }, + type : { value: null }, _sourceObject : { value: null }, sourceObject : { @@ -36,7 +28,7 @@ exports.Object = Montage.create(Component, { if(object._montage_metadata) { this.montageMetaData = object._montage_metadata; - this.type = this.getType(); + this.type = this.application.ninja.objectsController.getObjectCategory(object); } this._needsPropertyInspection = this.needsDraw = true; @@ -83,23 +75,12 @@ exports.Object = Montage.create(Component, { }, - _hasPrototype : { - value: function(object, prototypeName) { - var prototypes = this.application.ninja.objectsController.getPrototypes(object).map(function(proto) { - var metadata = proto._montage_metadata; - return (metadata) ? metadata.objectName : "Object"; - }); - - return prototypes.indexOf(prototypeName) !== -1; - } - }, - draw : { value: function() { if(this.type) { - this.element.classList.add('object-icon-'+this.type.toLowerCase()); + this.iconElement.classList.add('object-icon-'+this.type.toLowerCase()); } else{ - this.element.classList.add('object-icon-default'); + this.iconElement.classList.add('object-icon-default'); } -- cgit v1.2.3 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 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'js/panels/objects') 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%2ByEWC7YAhb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2Fe3t7S%2BPj4%2B%2FDB30XKX%2BRhq4fjGBRbBhFhsvY75bCyYKPJ58DmO2cscdd1bDawEFRWIaAAvxoua9Jfe3tGxHk7FMXJ6g3jNnDMT6o46OjucR0rdx3giuxGcNCV8wsjOUcdSGeYhzEKEpQMzLoQu%2BoqIcmCQJdGanm9raWvf2pqZVmIK4k%2FD63LmziePHj7eeOnXqBThxDOf4mMhvZES4iY%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 { -- cgit v1.2.3 From 5b303f858ab78877f26f61e87230b010460ee03b Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Wed, 20 Jun 2012 11:28:32 -0700 Subject: Objects Tray - Filter list of components for those without visual representation --- js/panels/objects/object.reel/object.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js index 76f1b5bf..b8bf1b1e 100644 --- a/js/panels/objects/object.reel/object.js +++ b/js/panels/objects/object.reel/object.js @@ -75,6 +75,22 @@ exports.Object = Montage.create(Component, { }, + /* --------------------- + Event Handlers + --------------------- */ + + handleClick: { + value: function(e) { + this.parentComponent.parentComponent.displayHUDForObject(this.sourceObject); + } + }, + + prepareForDraw : { + value: function() { + this.iconElement.addEventListener('click', this, false); + } + }, + draw : { value: function() { if(this.type) { -- cgit v1.2.3 From e9783135c3a6c95b7ccc3a6e45f40a030a2a067c Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Wed, 20 Jun 2012 11:40:17 -0700 Subject: Objects Tray - Use label instead of identifier for object name --- js/panels/objects/object.reel/object.css | 2 +- js/panels/objects/object.reel/object.html | 10 +++------- js/panels/objects/object.reel/object.js | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.css b/js/panels/objects/object.reel/object.css index f090ade6..79b7647c 100644 --- a/js/panels/objects/object.reel/object.css +++ b/js/panels/objects/object.reel/object.css @@ -43,7 +43,7 @@ margin: 0 auto 5px; width: 50px; } -.object-label { +.object-name { color: #fff; display: block; text-align: center; diff --git a/js/panels/objects/object.reel/object.html b/js/panels/objects/object.reel/object.html index 6274f480..f9de1499 100644 --- a/js/panels/objects/object.reel/object.html +++ b/js/panels/objects/object.reel/object.html @@ -21,14 +21,10 @@ "labelText": { "prototype": "montage/ui/dynamic-text.reel", "properties": { - "element": {"#": "label" } + "element": {"#": "name" } }, "bindings": { - "value" : { - "boundObject": {"@": "owner"}, - "boundObjectPropertyPath": "label", - "oneway": true - } + "value" : {"<-": "@owner.name"} } } @@ -41,7 +37,7 @@
  • - +
  • diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js index b8bf1b1e..6f8f5c92 100644 --- a/js/panels/objects/object.reel/object.js +++ b/js/panels/objects/object.reel/object.js @@ -48,8 +48,6 @@ exports.Object = Montage.create(Component, { this._identifier = value; - this.label = value; - this.needsDraw = true; } @@ -67,8 +65,8 @@ exports.Object = Montage.create(Component, { this._montageMetaData = data; - if(!this.identifier && data.label) { - this.label = data.label; + if(data.label) { + this.name = data.label; this.needsDraw = true; } } -- cgit v1.2.3 From 8abe69f8d179a3edd2498119ae2947d283c1b758 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 21 Jun 2012 13:54:53 -0700 Subject: Binding View - Minor Fixes to remove warnings Signed-off-by: Armen Kesablyan --- js/panels/objects/object.reel/object.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/panels/objects') diff --git a/js/panels/objects/object.reel/object.js b/js/panels/objects/object.reel/object.js index 6f8f5c92..1426f800 100644 --- a/js/panels/objects/object.reel/object.js +++ b/js/panels/objects/object.reel/object.js @@ -16,6 +16,17 @@ exports.Object = Montage.create(Component, { iconElement : { value: null }, type : { value: null }, + + _name : { value: null }, + name: { + get: function() { + return this._name; + }, + set: function(val) { + this.name = val; + } + }, + _sourceObject : { value: null }, sourceObject : { get: function() { -- cgit v1.2.3 From 4565558afff6fb07db3b5165042e028f467ac41b Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 21 Jun 2012 15:46:26 -0700 Subject: Binding View :Requested Changes for Pull Request Signed-off-by: Armen Kesablyan --- js/panels/objects/objects-panel.reel/objects-panel.js | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'js/panels/objects') diff --git a/js/panels/objects/objects-panel.reel/objects-panel.js b/js/panels/objects/objects-panel.reel/objects-panel.js index a1c381a2..727a09aa 100644 --- a/js/panels/objects/objects-panel.reel/objects-panel.js +++ b/js/panels/objects/objects-panel.reel/objects-panel.js @@ -23,13 +23,6 @@ exports.ObjectsPanel = Montage.create(Component, { } }, - - templateDidLoad: { - value: function() { - console.log('objects panel loaded'); - } - }, - prepareForDraw : { value: function() { @@ -40,14 +33,6 @@ exports.ObjectsPanel = Montage.create(Component, { }); } - }, - draw : { - value: function() { - console.log("objects panel draw"); - if(this.objects) { - - } - } } }); \ No newline at end of file -- cgit v1.2.3