From 5d7e470351fd150d5e70a97332fa2f2553797499 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 7 May 2012 11:09:45 -0700 Subject: Initial Setup of the binding Tool Signed-off-by: Armen Kesablyan --- css/ninja.css | 2 ++ images/cursors/binding.png | Bin 0 -> 1359 bytes images/tools/binding.png | Bin 0 -> 1140 bytes .../layout/tools-list.reel/tools-list.html | 4 +++ .../tools-properties.reel/tools-properties.html | 10 +++++- .../binding-properties.reel/binding-properties.css | 6 ++++ .../binding-properties.html | 35 +++++++++++++++++++++ .../binding-properties.reel/binding-properties.js | 25 +++++++++++++++ js/data/tools-data.js | 11 +++++++ js/tools/bindingTool.js | 32 +++++++++++++++++++ scss/imports/scss/_toolbar.scss | 4 +++ 11 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 images/cursors/binding.png create mode 100644 images/tools/binding.png create mode 100755 js/components/tools-properties/binding-properties.reel/binding-properties.css create mode 100755 js/components/tools-properties/binding-properties.reel/binding-properties.html create mode 100755 js/components/tools-properties/binding-properties.reel/binding-properties.js create mode 100644 js/tools/bindingTool.js diff --git a/css/ninja.css b/css/ninja.css index 650f3b08..6caa5d66 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -873,6 +873,8 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1 .InkBottleTool { background-image: url("../images/tools/Tool-FillColor.png"); } +.bindingTool { background-image: url("../images/tools/binding.png"); } + .toolsList .colortoolbar { padding-left: 1px; padding-top: 4px; } .toolsList .colortoolbar button { width: 27px; height: 27px; background: black; border: 1px solid #000; padding: 0; margin: 0px; } diff --git a/images/cursors/binding.png b/images/cursors/binding.png new file mode 100644 index 00000000..16e84574 Binary files /dev/null and b/images/cursors/binding.png differ diff --git a/images/tools/binding.png b/images/tools/binding.png new file mode 100644 index 00000000..33545ee1 Binary files /dev/null and b/images/tools/binding.png differ diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index acee20b2..f9361dd6 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -112,6 +112,9 @@ "ZoomTool1": { "prototype": "js/tools/ZoomTool" }, + "BindingTool1": { + "prototype": "js/tools/BindingTool" + }, "disable": { "prototype": "montage/ui/condition.reel", @@ -151,6 +154,7 @@ "RotateStageTool3D": {"@": "RotateStageTool3D1"}, "PanTool": {"@": "PanTool1"}, "ZoomTool": {"@": "ZoomTool1"}, + "bindingTool": {"@": "BindingTool1"}, "components": [ {"@": "repetition1"} ] diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html index 8dd0f713..90da0fbe 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.html +++ b/js/components/layout/tools-properties.reel/tools-properties.html @@ -120,6 +120,12 @@ "element": {"#": "zoomProperties"} } }, + "bindingProperties1": { + "prototype": "js/components/tools-properties/binding-properties.reel", + "properties": { + "element": {"#": "bindingProperties"} + } + }, "disable": { "prototype": "montage/ui/condition.reel", @@ -155,7 +161,8 @@ "eraserProperties": {"@": "eraserProperties1"}, "rotateStageProperties": {"@": "rotateStageProperties1"}, "panProperties": {"@": "panProperties1"}, - "zoomProperties": {"@": "zoomProperties1"} + "zoomProperties": {"@": "zoomProperties1"}, + "bindingProperties": {"@": "bindingProperties1"} }, "bindings": { "currentSelectedTool": { @@ -188,6 +195,7 @@
+
diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.css b/js/components/tools-properties/binding-properties.reel/binding-properties.css new file mode 100755 index 00000000..7f1b0f7f --- /dev/null +++ b/js/components/tools-properties/binding-properties.reel/binding-properties.css @@ -0,0 +1,6 @@ +/* + 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. +
*/ + diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.html b/js/components/tools-properties/binding-properties.reel/binding-properties.html new file mode 100755 index 00000000..5a55d0a4 --- /dev/null +++ b/js/components/tools-properties/binding-properties.reel/binding-properties.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + +
+ + +
+ + + + + \ No newline at end of file diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.js b/js/components/tools-properties/binding-properties.reel/binding-properties.js new file mode 100755 index 00000000..8d30d855 --- /dev/null +++ b/js/components/tools-properties/binding-properties.reel/binding-properties.js @@ -0,0 +1,25 @@ +/* +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. +
*/ + +var Montage = require("montage/core/core").Montage; +var Component = require("montage/ui/component").Component; +var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; + +exports.BindingProperties = Montage.create(ToolProperties, { + + _subPrepare: { + value: function() { + + } + }, + + handleClick: { + value: function(event) { + + } + } + +}); \ No newline at end of file diff --git a/js/data/tools-data.js b/js/data/tools-data.js index 4d009530..12c6c965 100755 --- a/js/data/tools-data.js +++ b/js/data/tools-data.js @@ -222,6 +222,17 @@ exports.ToolsData = Montage.create(Montage, { "lastInGroup": true, "container": false, "selected": false + }, + { + "id": "bindingTool", + "properties": "bindingProperties", + "spriteSheet": true, + "action": "bindingTool", + "toolTip": "Binding (B)", + "cursor": "url('images/cursors/binding.png'),default", + "lastInGroup": true, + "container": false, + "selected": false } ] }, diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js new file mode 100644 index 00000000..05a4965f --- /dev/null +++ b/js/tools/bindingTool.js @@ -0,0 +1,32 @@ +/* +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. +
*/ + +var Montage = require("montage/core/core").Montage, + DrawingTool = require("js/tools/drawing-tool").DrawingTool; + +exports.BindingTool = Montage.create(DrawingTool, { + drawingFeedback: { value: { mode: "Draw2D", type: "" } }, + + HandleLeftButtonDown: { + value: function(event) { + NJevent("enableStageMove"); + + } + }, + + HandleMouseMove: { + value: function(event) { + this.doDraw(event); + } + }, + + HandleLeftButtonUp: { + value: function(event) { + this.endDraw(event); + NJevent("disableStageMove"); + } + } +}); \ No newline at end of file diff --git a/scss/imports/scss/_toolbar.scss b/scss/imports/scss/_toolbar.scss index 9bf540cd..07389db7 100755 --- a/scss/imports/scss/_toolbar.scss +++ b/scss/imports/scss/_toolbar.scss @@ -140,6 +140,10 @@ background-image:url("../images/tools/Tool-FillColor.png"); } +.bindingTool { + background-image:url("../images/tools/binding.png"); +} + .toolsList .colortoolbar { padding-left: 1px; padding-top:4px; -- cgit v1.2.3 From e3efa52c409ef05c28bfc5f1f25a750b5132c3bd Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 9 May 2012 09:28:03 -0700 Subject: After merge file change Signed-off-by: Armen Kesablyan --- js/components/layout/tools-properties.reel/tools-properties.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html index 112cfcb0..9061cd12 100755 --- a/js/components/layout/tools-properties.reel/tools-properties.html +++ b/js/components/layout/tools-properties.reel/tools-properties.html @@ -1,4 +1,4 @@ - + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/js/panels/binding.reel/binding.js b/js/panels/binding.reel/binding.js new file mode 100644 index 00000000..e9676c4d --- /dev/null +++ b/js/panels/binding.reel/binding.js @@ -0,0 +1,11 @@ +var Montage = require("montage/core/core").Montage, + PanelBase = require("js/panels/panelbase").PanelBase; +//////////////////////////////////////////////////////////////////////// +//Exporting as ColorPanel +exports.BindingPanel = Montage.create(PanelBase, { + //////////////////////////////////////////////////////////////////// + //Panel Configuration + panelName: { + value: "Color" + } +}); \ No newline at end of file diff --git a/js/panels/objects.reel/objects.css b/js/panels/objects.reel/objects.css new file mode 100644 index 00000000..e69de29b diff --git a/js/panels/objects.reel/objects.html b/js/panels/objects.reel/objects.html new file mode 100644 index 00000000..b21097e7 --- /dev/null +++ b/js/panels/objects.reel/objects.html @@ -0,0 +1,27 @@ + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/js/panels/objects.reel/objects.js b/js/panels/objects.reel/objects.js new file mode 100644 index 00000000..c1451cc0 --- /dev/null +++ b/js/panels/objects.reel/objects.js @@ -0,0 +1,7 @@ +var Montage = require("montage/core/core").Montage, + PanelBase = require("js/panels/panelbase").PanelBase; +//////////////////////////////////////////////////////////////////////// +//Exporting as ColorPanel +exports.ObjectsPanel = Montage.create(PanelBase, { + +}); \ No newline at end of file diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index 05a4965f..282e3408 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -5,11 +5,30 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot */ var Montage = require("montage/core/core").Montage, - DrawingTool = require("js/tools/drawing-tool").DrawingTool; + DrawingTool = require("js/tools/drawing-tool").DrawingTool, +ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase; -exports.BindingTool = Montage.create(DrawingTool, { + +exports.BindingTool = Montage.create(ModifierToolBase, { drawingFeedback: { value: { mode: "Draw2D", type: "" } }, + Configure: { + value: function (doActivate) + { + if (doActivate) + { + NJevent("enableStageMove"); + document.body.classList.add("ws-binding"); + + } + else + { + NJevent("disableStageMove"); + document.body.classList.remove("ws-binding"); + } + } + }, + HandleLeftButtonDown: { value: function(event) { NJevent("enableStageMove"); diff --git a/scss/imports/scss/_MainWindow.scss b/scss/imports/scss/_MainWindow.scss index 2fdf0ac6..31ac97ea 100755 --- a/scss/imports/scss/_MainWindow.scss +++ b/scss/imports/scss/_MainWindow.scss @@ -206,7 +206,7 @@ background:$color-stage url('../images/temp/ruler-top.png'); height:15px; margin-bottom: 0px; - border-right: 11px solid black; + //border-right: 11px solid black; } .rulerLeft { @@ -214,7 +214,7 @@ // TODO: temporary background please replace when component is implemented background:$color-stage url('../images/temp/ruler-left.png'); width:16px; - border-bottom: 11px solid black; + //border-bottom: 11px solid black; } #stateBar { diff --git a/scss/imports/scss/_Workspace.scss b/scss/imports/scss/_Workspace.scss new file mode 100755 index 00000000..7bac37ab --- /dev/null +++ b/scss/imports/scss/_Workspace.scss @@ -0,0 +1,19 @@ +// +// 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. +//
+ +//Binding Mode + +body .panel.ws-binding { + display:none; +} + +body.ws-binding .rightPanelContent .panel { + display:none; +} + +body.ws-binding .rightPanelContent .panel.ws-binding { + display:block; +} \ No newline at end of file diff --git a/scss/ninja.scss b/scss/ninja.scss index 13db5588..73ca8ff2 100755 --- a/scss/ninja.scss +++ b/scss/ninja.scss @@ -32,6 +32,7 @@ @import "imports/scss/ScrollBars"; @import "imports/scss/Components"; @import "imports/scss/MontageOverrides"; +@import "imports/scss/Workspace"; body { } -- cgit v1.2.3 From 336e0e0ef242f5c472757fe3bbcdd54c04a00f1f Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 14 May 2012 10:32:59 -0700 Subject: Workspace: has customized Signed-off-by: Armen Kesablyan --- css/ninja.css | 4 ++-- js/data/panels-data.js | 2 +- js/panels/PanelContainer.reel/PanelContainer.js | 15 ++++++------- js/panels/binding-panel.reel/binding-panel.css | 0 js/panels/binding-panel.reel/binding-panel.html | 28 +++++++++++++++++++++++++ js/panels/binding-panel.reel/binding-panel.js | 12 +++++++++++ js/panels/binding.reel/binding.css | 0 js/panels/binding.reel/binding.html | 27 ------------------------ js/panels/binding.reel/binding.js | 11 ---------- js/panels/objects.reel/objects.html | 1 + scss/imports/scss/_Workspace.scss | 3 ++- 11 files changed, 54 insertions(+), 49 deletions(-) create mode 100644 js/panels/binding-panel.reel/binding-panel.css create mode 100644 js/panels/binding-panel.reel/binding-panel.html create mode 100644 js/panels/binding-panel.reel/binding-panel.js delete mode 100644 js/panels/binding.reel/binding.css delete mode 100644 js/panels/binding.reel/binding.html delete mode 100644 js/panels/binding.reel/binding.js diff --git a/css/ninja.css b/css/ninja.css index ebf16395..ec589902 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -997,10 +997,10 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1 .montage-invisible { display: none; } -body .panel.ws-binding { display: none; } +body .panel.ws-binding { display: none; -webkit-box-flex-group: 2; } body.ws-binding .rightPanelContent .panel { display: none; } -body.ws-binding .rightPanelContent .panel.ws-binding { display: block; } +body.ws-binding .rightPanelContent .panel.ws-binding { display: -webkit-box; } /*77*/ diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 7fa22995..23bfa1ed 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -116,7 +116,7 @@ exports.PanelsData = Montage.create(Montage, { collapsed: true, scrollable: true, open: true, - modulePath: "js/panels/binding.reel", + modulePath: "js/panels/binding-panel.reel", moduleName: "BindingPanel" }, { diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 044fd598..b4f77317 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js @@ -158,16 +158,17 @@ exports.PanelContainer = Montage.create(Component, { _setPanelsSizes: { value: function(panelActivated) { - this.panelsAvailable(); - var len = this.panels.length, setLocked = true; + var availablePanels = this.panelsAvailable(); + var len = availablePanels.length; + var setLocked = true; for(var i = 0; i < len; i++) { - if(this.panels[i] === panelActivated || panelActivated === null) { + if(availablePanels[i] === panelActivated || panelActivated === null) { setLocked = false; } - this.panels[i].locked = setLocked; - this.panels[i].needsDraw = true; + availablePanels[i].locked = setLocked; + availablePanels[i].needsDraw = true; } } }, @@ -176,7 +177,7 @@ exports.PanelContainer = Montage.create(Component, { value: function(panelActivated, unlockPanels) { var maxHeight = this.element.offsetHeight, setLocked = true; var availablePanels = this.panelsAvailable(); - var len = this.panels.length; + var len = availablePanels.length; if(unlockPanels === true) { setLocked = false; @@ -190,7 +191,7 @@ exports.PanelContainer = Montage.create(Component, { } for(var i = 0; i < len; i++) { - var obj = this['panel_'+i]; + var obj = availablePanels[i]; if(obj === panelActivated) { setLocked = false; diff --git a/js/panels/binding-panel.reel/binding-panel.css b/js/panels/binding-panel.reel/binding-panel.css new file mode 100644 index 00000000..e69de29b diff --git a/js/panels/binding-panel.reel/binding-panel.html b/js/panels/binding-panel.reel/binding-panel.html new file mode 100644 index 00000000..0db7b95f --- /dev/null +++ b/js/panels/binding-panel.reel/binding-panel.html @@ -0,0 +1,28 @@ + + + + + + + + + +
+ this is a test +
+ + \ No newline at end of file diff --git a/js/panels/binding-panel.reel/binding-panel.js b/js/panels/binding-panel.reel/binding-panel.js new file mode 100644 index 00000000..03fe5723 --- /dev/null +++ b/js/panels/binding-panel.reel/binding-panel.js @@ -0,0 +1,12 @@ +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; + + +exports.BindingPanel = Montage.create(Component, { + + prepareForDraw: { + value: function() { + console.log("test- objects"); + } + } +}); \ No newline at end of file diff --git a/js/panels/binding.reel/binding.css b/js/panels/binding.reel/binding.css deleted file mode 100644 index e69de29b..00000000 diff --git a/js/panels/binding.reel/binding.html b/js/panels/binding.reel/binding.html deleted file mode 100644 index 50e839ab..00000000 --- a/js/panels/binding.reel/binding.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - -
-
- - \ No newline at end of file diff --git a/js/panels/binding.reel/binding.js b/js/panels/binding.reel/binding.js deleted file mode 100644 index e9676c4d..00000000 --- a/js/panels/binding.reel/binding.js +++ /dev/null @@ -1,11 +0,0 @@ -var Montage = require("montage/core/core").Montage, - PanelBase = require("js/panels/panelbase").PanelBase; -//////////////////////////////////////////////////////////////////////// -//Exporting as ColorPanel -exports.BindingPanel = Montage.create(PanelBase, { - //////////////////////////////////////////////////////////////////// - //Panel Configuration - panelName: { - value: "Color" - } -}); \ No newline at end of file diff --git a/js/panels/objects.reel/objects.html b/js/panels/objects.reel/objects.html index b21097e7..a21e611c 100644 --- a/js/panels/objects.reel/objects.html +++ b/js/panels/objects.reel/objects.html @@ -22,6 +22,7 @@
+ objects:test
\ No newline at end of file diff --git a/scss/imports/scss/_Workspace.scss b/scss/imports/scss/_Workspace.scss index 7bac37ab..06f50a23 100755 --- a/scss/imports/scss/_Workspace.scss +++ b/scss/imports/scss/_Workspace.scss @@ -8,6 +8,7 @@ body .panel.ws-binding { display:none; + -webkit-box-flex-group:2; } body.ws-binding .rightPanelContent .panel { @@ -15,5 +16,5 @@ body.ws-binding .rightPanelContent .panel { } body.ws-binding .rightPanelContent .panel.ws-binding { - display:block; + display:-webkit-box; } \ No newline at end of file -- cgit v1.2.3 From 9fc3b70bf57e10846e71808c6041fbc339a435d1 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 14 May 2012 11:43:40 -0700 Subject: Changes Signed-off-by: Armen Kesablyan --- .../binding-properties.reel/binding-properties.css | 11 +++++++++++ .../binding-properties.reel/binding-properties.html | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.css b/js/components/tools-properties/binding-properties.reel/binding-properties.css index 7f1b0f7f..19d2b6c6 100755 --- a/js/components/tools-properties/binding-properties.reel/binding-properties.css +++ b/js/components/tools-properties/binding-properties.reel/binding-properties.css @@ -4,3 +4,14 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ +.bindingSubTools { + padding:9px; + font-size:12px; +} + +.bindingSubTools label { + +} +.bindingSubTools input[type=checkbox] { + margin: 0px 3px; +} \ No newline at end of file diff --git a/js/components/tools-properties/binding-properties.reel/binding-properties.html b/js/components/tools-properties/binding-properties.reel/binding-properties.html index 5a55d0a4..cd0e0a50 100755 --- a/js/components/tools-properties/binding-properties.reel/binding-properties.html +++ b/js/components/tools-properties/binding-properties.reel/binding-properties.html @@ -24,9 +24,9 @@ -
+
+ -
-- cgit v1.2.3 From c3452da7c18f73f45e4e6a58918f6459e7915b62 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 15 May 2012 15:02:40 -0700 Subject: Finished skeleton structure for binding. Signed-off-by: Armen Kesablyan --- css/ninja.css | 8 +++++--- js/data/panels-data.js | 7 +++++++ js/ninja.reel/ninja.js | 6 ++++-- js/tools/bindingTool.js | 5 +++-- scss/imports/scss/_Workspace.scss | 13 +++++++++---- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/css/ninja.css b/css/ninja.css index db2497c8..39acfe60 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -989,10 +989,12 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1 .montage-invisible { display: none; } -body .panel.ws-binding { display: none; -webkit-box-flex-group: 2; } +.panels .panel { display: none; } -body.ws-binding .rightPanelContent .panel { display: none; } +.panels .panel.ws-binding { display: none; -webkit-box-flex-group: 2; } -body.ws-binding .rightPanelContent .panel.ws-binding { display: -webkit-box; } +body.ws-binding .panel.ws-binding { display: -webkit-box; } + +body.ws-default .panel.default { display: -webkit-box; -webkit-box-flex-group: 1; } /*77*/ diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 23bfa1ed..38fa3426 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -12,6 +12,7 @@ exports.PanelsData = Montage.create(Montage, { value: [ { name: "Color", + groups: ["default"], height: 200, minHeight: 200, maxHeight: null, @@ -24,6 +25,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Properties", + groups: ["default", "ws-binding"], minHeight: 200, height: 200, maxHeight: null, @@ -36,6 +38,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Materials", + groups: ["default"], minHeight: 100, height: 100, maxHeight: null, @@ -48,6 +51,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Components", + groups: ["default", "ws-binding"], minHeight: 100, height: 200, maxHeight: null, @@ -72,6 +76,7 @@ exports.PanelsData = Montage.create(Montage, { // }, { name: "CSS", + groups: ["default"], minHeight: 195, height: 195, maxHeight: null, @@ -84,6 +89,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "Presets", + groups: ["default"], minHeight: 100, height: 100, maxHeight: null, @@ -96,6 +102,7 @@ exports.PanelsData = Montage.create(Montage, { }, { name: "History", + groups: ["default"], minHeight: 100, height: 100, maxHeight: null, diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 7ab8e52c..75b2203e 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -27,11 +27,12 @@ exports.Ninja = Montage.create(Component, { return this.workspaceMode; }, set: function(val) { - if( this._workspaceMode === val ) { + if(this._workspaceMode !== val ) { if(this._workspaceMode !== null) { - document.body.classList.remove("ws-" + val); + document.body.classList.remove("ws-" + this._workspaceMode); } document.body.classList.add("ws-" + val); + this._workspaceMode = val; } } }, @@ -166,6 +167,7 @@ exports.Ninja = Montage.create(Component, { prepareForDraw: { value: function() { + this.workspaceMode = "default"; console.log("Loading Ninja --> ", this.ninjaVersion); this.application.ninja = this; diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index 282e3408..f9e81223 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -18,13 +18,14 @@ exports.BindingTool = Montage.create(ModifierToolBase, { if (doActivate) { NJevent("enableStageMove"); - document.body.classList.add("ws-binding"); + this.application.ninja.workspaceMode = "binding"; } else { NJevent("disableStageMove"); - document.body.classList.remove("ws-binding"); + debugger; + this.application.ninja.workspaceMode = "default"; } } }, diff --git a/scss/imports/scss/_Workspace.scss b/scss/imports/scss/_Workspace.scss index 06f50a23..c40c5e60 100755 --- a/scss/imports/scss/_Workspace.scss +++ b/scss/imports/scss/_Workspace.scss @@ -6,15 +6,20 @@ //Binding Mode -body .panel.ws-binding { +.panels .panel { + display: none; +} + +.panels .panel.ws-binding { display:none; -webkit-box-flex-group:2; } -body.ws-binding .rightPanelContent .panel { - display:none; +body.ws-binding .panel.ws-binding { + display:-webkit-box; } -body.ws-binding .rightPanelContent .panel.ws-binding { +body.ws-default .panel.default { display:-webkit-box; + -webkit-box-flex-group:1; } \ No newline at end of file -- cgit v1.2.3 From 15a3aaebb56cb2c9409bfe55c862868726c7fd44 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 15 May 2012 16:32:04 -0700 Subject: removed debugger line Signed-off-by: Armen Kesablyan --- js/tools/bindingTool.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index f9e81223..1a8cb47f 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -24,7 +24,6 @@ exports.BindingTool = Montage.create(ModifierToolBase, { else { NJevent("disableStageMove"); - debugger; this.application.ninja.workspaceMode = "default"; } } -- cgit v1.2.3 From d48f086ad64badf07b5f82bf6e0216074eac7a25 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 16 May 2012 18:25:03 -0700 Subject: Initial Binding Hud Signed-off-by: Armen Kesablyan --- .../binding-hud.reel/binding-hud.css | 5 ++ .../binding-hud.reel/binding-hud.html | 47 ++++++++++++++++++ .../binding-hud.reel/binding-hud.js | 16 +++++++ js/stage/binding-view.reel/binding-view.css | 5 ++ js/stage/binding-view.reel/binding-view.html | 55 ++++++++++++++++++++++ js/stage/binding-view.reel/binding-view.js | 26 ++++++++++ js/tools/bindingTool.js | 21 ++++++++- 7 files changed, 173 insertions(+), 2 deletions(-) create mode 100755 js/stage/binding-view.reel/binding-hud.reel/binding-hud.css create mode 100755 js/stage/binding-view.reel/binding-hud.reel/binding-hud.html create mode 100755 js/stage/binding-view.reel/binding-hud.reel/binding-hud.js create mode 100755 js/stage/binding-view.reel/binding-view.css create mode 100755 js/stage/binding-view.reel/binding-view.html create mode 100755 js/stage/binding-view.reel/binding-view.js diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css new file mode 100755 index 00000000..018448f1 --- /dev/null +++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css @@ -0,0 +1,5 @@ +/* + 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. +
*/ diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html new file mode 100755 index 00000000..73252de4 --- /dev/null +++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html @@ -0,0 +1,47 @@ + + + + + + + + + + + + + +
+
+ +
+
+ + + diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js new file mode 100755 index 00000000..cbb4c1d7 --- /dev/null +++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js @@ -0,0 +1,16 @@ +/* +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.bindingHud = Montage.create(Component, { + +}); \ No newline at end of file diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css new file mode 100755 index 00000000..018448f1 --- /dev/null +++ b/js/stage/binding-view.reel/binding-view.css @@ -0,0 +1,5 @@ +/* + 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. +
*/ diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html new file mode 100755 index 00000000..e3495542 --- /dev/null +++ b/js/stage/binding-view.reel/binding-view.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + + diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js new file mode 100755 index 00000000..4daa85b3 --- /dev/null +++ b/js/stage/binding-view.reel/binding-view.js @@ -0,0 +1,26 @@ +/* +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.bindingView = Montage.create(Component, { + _bindables: { + value: [] + }, + bindables: { + get: function() { + return this._bindables; + }, + set: function(val) { + this._bindables = val; + } + } +}); \ No newline at end of file diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js index 1a8cb47f..5953c409 100644 --- a/js/tools/bindingTool.js +++ b/js/tools/bindingTool.js @@ -7,6 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot var Montage = require("montage/core/core").Montage, DrawingTool = require("js/tools/drawing-tool").DrawingTool, ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase; +SelectionTool = require("js/tools/SelectionTool").SelectionTool; exports.BindingTool = Montage.create(ModifierToolBase, { @@ -44,8 +45,24 @@ exports.BindingTool = Montage.create(ModifierToolBase, { HandleLeftButtonUp: { value: function(event) { - this.endDraw(event); - NJevent("disableStageMove"); + + if(this._escape) { + this._escape = false; + return; + } + + if(this._hasDraw) { + this._hasDraw = false; + this.endDraw(event); + } else { + this.doSelection(event); + if (this.application.ninja.selectedElements.length !== 0 ) { + this.selectedElement = this.application.ninja.selectedElements[0]; + } + this._isDrawing = false; + } + //this.endDraw(event); + //NJevent("disableStageMove"); } } }); \ No newline at end of file -- cgit v1.2.3 From ab7f00cdf7941bd788fcf44e70e4d2a6ad8b2012 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Wed, 16 May 2012 22:18:39 -0700 Subject: Objects Panel - Hook in objects panel --- js/data/panels-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 38fa3426..37957892 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -136,7 +136,7 @@ exports.PanelsData = Montage.create(Montage, { collapsed: true, scrollable: true, open: true, - modulePath: "js/panels/objects.reel", + modulePath: "js/panels/objects/objects-panel.reel", moduleName: "ObjectsPanel" } ] -- cgit v1.2.3 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 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 @@ + + + + + + + + + + + + + +
    +