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