diff options
8 files changed, 20 insertions, 2582 deletions
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js index 72a6f034..c5729e98 100755 --- a/js/components/tools-properties/text-properties.reel/text-properties.js +++ b/js/components/tools-properties/text-properties.reel/text-properties.js | |||
@@ -296,14 +296,18 @@ exports.TextProperties = Montage.create(ToolProperties, { | |||
296 | 296 | ||
297 | handleFontSelectionChange: { | 297 | handleFontSelectionChange: { |
298 | value: function(e) { | 298 | value: function(e) { |
299 | this.application.ninja.stage.textTool.doAction("fontname", this.fontSelection.value); | ||
300 | this.application.ninja.stage.textTool.element.focus(); | 299 | this.application.ninja.stage.textTool.element.focus(); |
300 | this.application.ninja.stage.textTool.doAction("fontname", this.fontSelection.value); | ||
301 | |||
302 | //Note: Set Font Color on selection to ColorChip Component; | ||
303 | //this.this.application.ninja.stage.textTool.foreColor | ||
304 | |||
301 | } | 305 | } |
302 | }, | 306 | }, |
303 | 307 | ||
304 | handleFontColorChange: { | 308 | handleFontColorChange: { |
305 | value: function(e) { | 309 | value: function(e) { |
306 | this.application.ninja.stage.textTool.element.style.color = e._event.color.css; | 310 | this.application.ninja.stage.textTool.foreColor = e._event.color.css; |
307 | this.application.ninja.stage.textTool.element.focus(); | 311 | this.application.ninja.stage.textTool.element.focus(); |
308 | //this.application.ninja.stage.textTool.doAction("forecolor",e._event.color.css); | 312 | //this.application.ninja.stage.textTool.doAction("forecolor",e._event.color.css); |
309 | 313 | ||
diff --git a/js/tools/TextTool.js b/js/tools/TextTool.js index 7f82855b..aa79b8bc 100755 --- a/js/tools/TextTool.js +++ b/js/tools/TextTool.js | |||
@@ -6,7 +6,6 @@ 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 = ("node_modules/labs/rich-text-editor.reel").RichTextEditor, | ||
10 | ElementsMediator = require("js/mediators/element-mediator").ElementMediator; | 9 | ElementsMediator = require("js/mediators/element-mediator").ElementMediator; |
11 | 10 | ||
12 | exports.TextTool = Montage.create(DrawingTool, { | 11 | exports.TextTool = Montage.create(DrawingTool, { |
@@ -23,22 +22,30 @@ exports.TextTool = Montage.create(DrawingTool, { | |||
23 | return this._selectedElement; | 22 | return this._selectedElement; |
24 | }, | 23 | }, |
25 | set: function(val) { | 24 | set: function(val) { |
25 | //Set Selected Element | ||
26 | if (this._selectedElement !== null) { | 26 | if (this._selectedElement !== null) { |
27 | this.selectedElement.innerHTML = this.application.ninja.stage.textTool.value; | 27 | this.applyStyle(); |
28 | this.application.ninja.stage.textTool.value = ""; | ||
29 | this.application.ninja.stage.textTool.element.style.display = "none"; | ||
30 | ElementsMediator.setProperty(this.application.ninja.selectedElements, "color", [window.getComputedStyle(this.application.ninja.stage.textTool.element)["color"]], "Change", "textTool"); | ||
31 | } | 28 | } |
32 | //Set Selected Element | ||
33 | this._selectedElement = val; | 29 | this._selectedElement = val; |
34 | if(val !== null) { | 30 | if(this._selectedElement !== null) { |
35 | this.drawTextTool(); | 31 | this.drawTextTool(); |
36 | this.handleScroll(); | 32 | this.handleScroll(); |
37 | this.application.ninja.stage._iframeContainer.addEventListener("scroll", this, false); | 33 | this.application.ninja.stage._iframeContainer.addEventListener("scroll", this, false); |
38 | } else { | 34 | } else { |
39 | this.application.ninja.stage._iframeContainer.removeEventListener("scroll", this); | 35 | this.application.ninja.stage._iframeContainer.removeEventListener("scroll", this); |
40 | } | 36 | } |
37 | |||
38 | } | ||
39 | }, | ||
40 | |||
41 | applyStyle: { | ||
42 | value: function() { | ||
43 | this.selectedElement.innerHTML = this.application.ninja.stage.textTool.value; | ||
44 | this.application.ninja.stage.textTool.value = ""; | ||
45 | this.application.ninja.stage.textTool.element.style.display = "none"; | ||
46 | //ElementsMediator.setProperty([this.selectedElement], "color", [window.getComputedStyle(this.application.ninja.stage.textTool.element)["color"]], "Change", "textTool"); | ||
41 | } | 47 | } |
48 | |||
42 | }, | 49 | }, |
43 | 50 | ||
44 | HandleLeftButtonDown: { | 51 | HandleLeftButtonDown: { |
diff --git a/node_modules/labs/rich-text-editor.reel/rich-text-editor.css b/node_modules/labs/rich-text-editor.reel/rich-text-editor.css deleted file mode 100644 index 656183c4..00000000 --- a/node_modules/labs/rich-text-editor.reel/rich-text-editor.css +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | .montage-editor { | ||
8 | /* need to be relative in order for the resizer to be positioned correctly */ | ||
9 | position: absolute; | ||
10 | top: 0; | ||
11 | left: 0; | ||
12 | bottom: 0; | ||
13 | right: 0; | ||
14 | padding: 4px; | ||
15 | |||
16 | font-size: 1.0em; | ||
17 | outline: none; | ||
18 | overflow: auto; | ||
19 | z-index: 1; | ||
20 | } | ||
21 | |||
22 | .montage-editor-frame { | ||
23 | position: relative; | ||
24 | overflow: auto; | ||
25 | height: 100%; | ||
26 | width: 100%; | ||
27 | } | ||
28 | |||
29 | .montage-resizer-element::selection { | ||
30 | background: rgba(0,0,0,0); | ||
31 | } | ||
32 | |||
33 | |||
34 | /* | ||
35 | Resizer | ||
36 | */ | ||
37 | .montage-resizer { | ||
38 | display: inline-block; | ||
39 | } | ||
40 | |||
41 | .montage-resizer-frame { | ||
42 | position: absolute; | ||
43 | border: 1px solid black; | ||
44 | z-index: 30; | ||
45 | } | ||
46 | |||
47 | .montage-resizer-handle { | ||
48 | position: absolute; | ||
49 | border: 1px solid black; | ||
50 | background-color: white; | ||
51 | width: 6px; | ||
52 | height: 6px; | ||
53 | z-index: 31; | ||
54 | } | ||
55 | |||
56 | .montage-resizer.dragged .montage-resizer-handle{ | ||
57 | display: none; | ||
58 | } | ||
59 | |||
60 | .montage-resizer-handle:hover { | ||
61 | background-color: black; | ||
62 | } | ||
63 | |||
64 | .montage-resizer-n { | ||
65 | cursor: n-resize; | ||
66 | } | ||
67 | .montage-resizer-ne { | ||
68 | cursor: ne-resize; | ||
69 | } | ||
70 | .montage-resizer-e { | ||
71 | cursor: e-resize; | ||
72 | } | ||
73 | .montage-resizer-se { | ||
74 | cursor: se-resize; | ||
75 | } | ||
76 | .montage-resizer-s { | ||
77 | cursor: s-resize; | ||
78 | } | ||
79 | .montage-resizer-sw { | ||
80 | cursor: sw-resize; | ||
81 | } | ||
82 | .montage-resizer-w { | ||
83 | cursor: w-resize; | ||
84 | } | ||
85 | .montage-resizer-nw { | ||
86 | cursor: nw-resize; | ||
87 | } | ||
88 | |||
89 | |||
90 | /* | ||
91 | Link Popup | ||
92 | */ | ||
93 | .montage-link-popup { | ||
94 | -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2); | ||
95 | -webkit-border-radius: 2px; | ||
96 | border-radius: 2px; | ||
97 | position: absolute; | ||
98 | border: 1px solid; | ||
99 | background-color: white; | ||
100 | color: #666; | ||
101 | padding: 12px 20px; | ||
102 | z-index: 50; | ||
103 | cursor: default; | ||
104 | border-color: #BBB #BBB #A8A8A8; | ||
105 | font: 13px/normal "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
106 | } | ||
107 | |||
108 | .montage-link-popup a { | ||
109 | cursor: pointer; | ||
110 | text-decoration: none; | ||
111 | color: #15C; | ||
112 | } \ No newline at end of file | ||
diff --git a/node_modules/labs/rich-text-editor.reel/rich-text-editor.html b/node_modules/labs/rich-text-editor.reel/rich-text-editor.html deleted file mode 100644 index 42425b40..00000000 --- a/node_modules/labs/rich-text-editor.reel/rich-text-editor.html +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html> | ||
8 | <head> | ||
9 | <title></title> | ||
10 | <link rel="stylesheet" type="text/css" href="rich-text-editor.css"> | ||
11 |