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