aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.js22
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.html56
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.js26
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.css14
-rwxr-xr-xjs/components/ui/icon-list-basic/icon.reel/icon.js14
-rwxr-xr-xjs/components/ui/tree-basic/treeItem.reel/treeItem.js14
6 files changed, 98 insertions, 48 deletions
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js
index da4e8c0f..b10f6624 100755
--- a/js/components/gradientpicker.reel/gradientpicker.js
+++ b/js/components/gradientpicker.reel/gradientpicker.js
@@ -213,21 +213,13 @@ exports.GradientPicker = Montage.create(Component, {
213 removeStop: { 213 removeStop: {
214 enumerable: false, 214 enumerable: false,
215 value: function(stop) { 215 value: function(stop) {
216 //Removing stops
217 this.element._components.stopsContainer.removeChild(stop);
218 //Stopping events related to this current stop
219 this.removeStopMoving();
220 //Resetting stops if less than 2
221 var i, buttons = this.element._components.stopsContainer.getElementsByTagName('button'); 216 var i, buttons = this.element._components.stopsContainer.getElementsByTagName('button');
222 if (buttons.length < 2) { 217 //
223 //Removing remaining stops prior to resetting 218 if (buttons.length > 2) {
224 for (i=0; buttons[i]; i++) { 219 //Removing stops
225 this.element._components.stopsContainer.removeChild(buttons[i].stop); 220 this.element._components.stopsContainer.removeChild(stop);
226 } 221 //Stopping events related to this current stop
227 //Nulling then adding defaults 222 this.removeStopMoving();
228 this.value = null;
229 this.addDefaultStops();
230 this._dispatchEvent('change', false);
231 } 223 }
232 } 224 }
233 }, 225 },
@@ -327,7 +319,7 @@ exports.GradientPicker = Montage.create(Component, {
327 // 319 //
328 this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); 320 this.application.ninja.colorController.colorPopupManager.hideColorChipPopup();
329 // 321 //
330 if ((e._event.y+this.hack.y) > this.element._trackY+50 || (e._event.y+this.hack.y) < this.element._trackY) { 322 if ((e._event.y+this.hack.y) > this.element._trackY+70 || (e._event.y+this.hack.y) < this.element._trackY) {
331 this.removeStop(this.currentStop); 323 this.removeStop(this.currentStop);
332 } 324 }
333 // 325 //
diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.html b/js/components/tools-properties/brush-properties.reel/brush-properties.html
index 38f7f856..608111bd 100755
--- a/js/components/tools-properties/brush-properties.reel/brush-properties.html
+++ b/js/components/tools-properties/brush-properties.reel/brush-properties.html
@@ -11,12 +11,55 @@
11 11
12 <script type="text/montage-serialization"> 12 <script type="text/montage-serialization">
13 { 13 {
14 "strokeSizeHT": {
15 "module": "js/components/hottextunit.reel",
16 "name": "HotTextUnit",
17 "properties": {
18 "element": {"#": "strokeSize"},
19 "minValue": 1,
20 "maxValue": 100,
21 "value": 1,
22 "decimalPlace": 10,
23 "acceptableUnits" : ["px", "pt"]
24 }
25 },
26
27 "strokeHardnessHT": {
28 "module": "js/components/hottextunit.reel",
29 "name": "HotTextUnit",
30 "properties": {
31 "element": {"#": "strokeHardness"},
32 "minValue": 0,
33 "maxValue": 100,
34 "value": 100,
35 "decimalPlace": 10,
36 "acceptableUnits" : ["px", "pt"]
37 }
38 },
39
40 "strokeAngleHT": {
41 "module": "js/components/hottextunit.reel",
42 "name": "HotTextUnit",
43 "properties": {
44 "element": {"#": "strokeAngle"},
45 "minValue": -90,
46 "maxValue": 90,
47 "value": 0,
48 "decimalPlace": 10,
49 "acceptableUnits" : ["px", "pt"]
50 }
51 },
14 52
15 "owner": { 53 "owner": {
16 "module": "js/components/tools-properties/brush-properties.reel", 54 "module": "js/components/tools-properties/brush-properties.reel",
17 "name": "BrushProperties", 55 "name": "BrushProperties",
18 "properties": { 56 "properties": {
19 "element": {"#": "brushProperties"} 57 "element": {"#": "brushProperties"},
58 "_strokeSize": {"@": "strokeSizeHT"},
59 "_strokeHardness": {"@": "strokeHardnessHT"},
60 "_doSmoothing": {"#": "doSmoothing"},
61 "_useCalligraphic":{"#": "useCalligraphic"},
62 "_strokeAngle": {"@": "strokeAngleHT"}
20 } 63 }
21 } 64 }
22 } 65 }
@@ -26,6 +69,17 @@
26 69
27 <body> 70 <body>
28 <div id="brushProperties" class="subToolHolderPanel"> 71 <div id="brushProperties" class="subToolHolderPanel">
72 <div id="strokesContainer" class="leftLabel" style="margin-left:25px; padding-top: 3px;">
73 <label class="label"> Width:</label>
74 <div id="strokeSize" class="label"></div>
75 <label class="label"> Hardness:</label>
76 <div id="strokeHardness" class="label"></div>
77 <label class="label"><input id="doSmoothing" type="checkbox" name="doSmoothingControl" class="checkBoxAlign"/>Smoothing</label>
78 <label class="label"><input id="useCalligraphic" type="checkbox" name="useCalligraphicControl" class="checkBoxAlign"/>Calligraphic</label>
79 <label class="label"> Angle:</label>
80 <div id="strokeAngle" class="label"></div>
81
82 </div>
29 </div> 83 </div>
30 </body> 84 </body>
31 85
diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js
index 92da98cc..e6faa0f0 100755
--- a/js/components/tools-properties/brush-properties.reel/brush-properties.js
+++ b/js/components/tools-properties/brush-properties.reel/brush-properties.js
@@ -9,17 +9,19 @@ var Component = require("montage/ui/component").Component;
9var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; 9var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
10 10
11exports.BrushProperties = Montage.create(ToolProperties, { 11exports.BrushProperties = Montage.create(ToolProperties, {
12 12 strokeSize: {
13 13 get: function() { return this._strokeSize; }
14 _subPrepare: {
15 value: function() {
16 //this.divElement.addEventListener("click", this, false);
17 }
18 }, 14 },
19 15 strokeHardness: {
20 handleClick: { 16 get: function() { return this._strokeHardness; }
21 value: function(event) { 17 },
22 // this.selectedElement = event._event.target.id; 18 doSmoothing:{
23 } 19 get: function() {return this._doSmoothing.checked; }
20 },
21 useCalligraphic: {
22 get: function() {return this._useCalligraphic.checked;}
23 },
24 strokeAngle: {
25 get: function() {return this._strokeAngle;}
24 } 26 }
25}); \ No newline at end of file 27});
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
index fedc1d9d..cc8108f6 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
@@ -3,7 +3,12 @@
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<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. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6 6.treeRoot .branch-label, .treeRoot .leaf-label {
7 margin: 0 8px;
8}
9.treeRoot .leaf-label:hover {
10 margin: 0;
11}
7.treeRoot .leaf-label { 12.treeRoot .leaf-label {
8 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAIAAAD9iXMrAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6Y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XAuZGlkOkRDNzAwRTVFNDEzQzExRTFBQzQwREE3MzUxRUQxRDEwIi8%2BIDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY%2BIDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8%2BUcaK3QAAANFJREFUeNqMULEOREAQdYjvuE%2FYWlSUQqKQ7A%2FsD6n0SoVCFHpRa0SllvgFlpvzZO9OcfGSnbx9M%2FNmMpp2Dw96VVX9L%2FJ93wRrmkZJIKrZcRyK%2Bs25p5%2BU8pK4KCakMAzxL4oCJIqivu8Nw0DDu25ZFtW3ritIkiS0tGVZtm1%2F6rZtu4yr67osSyJBEJx3ybKsbVukOecU4zh2XRfKMAzTNJmYpWxgPM%2BzEIIxRrzrOs%2FzdMyVvyAxTdPxAJFzv%2BeBbz8cfN93kDzPb55ZewkwAF0Ddf6ATSsHAAAAAElFTkSuQmCC);
9 background-position: 3px center; 14 background-position: 3px center;
@@ -12,6 +17,11 @@
12 cursor: pointer; 17 cursor: pointer;
13 padding: 3px 0 4px; 18 padding: 3px 0 4px;
14}