diff options
author | hwc487 | 2012-04-19 13:01:43 -0700 |
---|---|---|
committer | hwc487 | 2012-04-19 13:01:43 -0700 |
commit | e6a20fe64574763483dc602bd759278ccf5e5e68 (patch) | |
tree | 69defe7200206f0257fe90697136fadef59d521e /js/tools/TextTool.js | |
parent | ae7eb87564632ce7c676bd728b8ff2710ff0bb83 (diff) | |
parent | 9284c19f076dec3b47ece7dc7bcd22d74e4246c3 (diff) | |
download | ninja-e6a20fe64574763483dc602bd759278ccf5e5e68.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/drawing/world.js
js/lib/geom/geom-obj.js
js/lib/rdge/materials/cloud-material.js
js/lib/rdge/materials/deform-material.js
js/lib/rdge/materials/flat-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/relief-tunnel-material.js
js/lib/rdge/materials/square-tunnel-material.js
js/lib/rdge/materials/star-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/tunnel-material.js
js/lib/rdge/materials/twist-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/uber-material.js
js/lib/rdge/materials/water-material.js
js/lib/rdge/materials/z-invert-material.js
Diffstat (limited to 'js/tools/TextTool.js')
-rwxr-xr-x | js/tools/TextTool.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/tools/TextTool.js b/js/tools/TextTool.js index 4c464173..a58aacc6 100755 --- a/js/tools/TextTool.js +++ b/js/tools/TextTool.js | |||
@@ -6,7 +6,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | DrawingTool = require("js/tools/drawing-tool").DrawingTool; | 8 | DrawingTool = require("js/tools/drawing-tool").DrawingTool; |
9 | RichTextEditor = require("node_modules/labs/rich-text-editor.reel").RichTextEditor; | 9 | RichTextEditor = require("node_modules/labs/rich-text-editor.reel").RichTextEditor, |
10 | ElementsMediator = require("js/mediators/element-mediator").ElementMediator; | ||
10 | 11 | ||
11 | exports.TextTool = Montage.create(DrawingTool, { | 12 | exports.TextTool = Montage.create(DrawingTool, { |
12 | 13 | ||
@@ -21,7 +22,7 @@ exports.TextTool = Montage.create(DrawingTool, { | |||
21 | this.selectedElement.innerHTML = this.application.ninja.stage.textTool.value; | 22 | this.selectedElement.innerHTML = this.application.ninja.stage.textTool.value; |
22 | this.application.ninja.stage.textTool.value = ""; | 23 | this.application.ninja.stage.textTool.value = ""; |
23 | this.application.ninja.stage.textTool.element.style.display = "none"; | 24 | this.application.ninja.stage.textTool.element.style.display = "none"; |
24 | this.applyElementStyles(this.application.ninja.stage.textTool.element.firstChild, this.selectedElement, ["color"]); | 25 | ElementsMediator.setProperty(this.application.ninja.selectedElements, "color", [window.getComputedStyle(this.application.ninja.stage.textTool.element.firstChild)["color"]], "Change", "textTool"); |
25 | } | 26 | } |
26 | //Set Selected Element | 27 | //Set Selected Element |
27 | this._selectedElement = val; | 28 | this._selectedElement = val; |
@@ -94,7 +95,7 @@ exports.TextTool = Montage.create(DrawingTool, { | |||
94 | } else { | 95 | } else { |
95 | this.doSelection(event); | 96 | this.doSelection(event); |
96 | if (this.application.ninja.selectedElements.length !== 0 ) { | 97 | if (this.application.ninja.selectedElements.length !== 0 ) { |
97 | this.selectedElement = this.application.ninja.selectedElements[0]._element; | 98 | this.selectedElement = this.application.ninja.selectedElements[0]; |
98 | } | 99 | } |
99 | this._isDrawing = false; | 100 | this._isDrawing = false; |
100 | } | 101 | } |
@@ -143,7 +144,7 @@ exports.TextTool = Montage.create(DrawingTool, { | |||
143 | 144 | ||
144 | HandleDoubleClick: { | 145 | HandleDoubleClick: { |
145 | value: function(e) { | 146 | value: function(e) { |
146 | //this.application.ninja.selectedElements[0]._element.setAttribute("contenteditable", true); | 147 | //this.application.ninja.selectedElements[0].setAttribute("contenteditable", true); |
147 | 148 | ||
148 | //if (!this.application.ninja.textTool) { | 149 | //if (!this.application.ninja.textTool) { |
149 | 150 | ||