aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorPushkar Joshi2012-01-30 14:30:31 -0800
committerPushkar Joshi2012-01-30 14:30:31 -0800
commitda7ad067b146200847b543faf288844221dff928 (patch)
tree37253f34bc8234c4b08dfbe0af6b6bd465d8e808 /js
parent76abbaafb0d90bb1dc9c63a5a5a78ab95bb00420 (diff)
downloadninja-da7ad067b146200847b543faf288844221dff928.tar.gz
missed a couple of pen tool property files on last checkin
Diffstat (limited to 'js')
-rw-r--r--js/components/tools-properties/pen-properties.reel/pen-properties.html22
-rw-r--r--js/components/tools-properties/pen-properties.reel/pen-properties.js18
2 files changed, 21 insertions, 19 deletions
diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.html b/js/components/tools-properties/pen-properties.reel/pen-properties.html
index 7af35a03..74a3a747 100644
--- a/js/components/tools-properties/pen-properties.reel/pen-properties.html
+++ b/js/components/tools-properties/pen-properties.reel/pen-properties.html
@@ -12,12 +12,25 @@
12 <script type="text/montage-serialization"> 12 <script type="text/montage-serialization">
13 { 13 {
14 14
15 "strokeSizeHT": {
16 "module": "js/components/hottextunit.reel",
17 "name": "HotTextUnit",
18 "properties": {
19 "element": {"#": "strokeSize"},
20 "minValue": 1,
21 "maxValue": 100,
22 "value": 1,
23 "decimalPlace": 10,
24 "acceptableUnits" : ["px", "pt"]
25 }
26 },
27
15 "owner": { 28 "owner": {
16 "module": "js/components/tools-properties/pen-properties.reel", 29 "module": "js/components/tools-properties/pen-properties.reel",
17 "name": "PenProperties", 30 "name": "PenProperties",
18 "properties": { 31 "properties": {
19 "element": {"#": "penProperties"}, 32 "element": {"#": "penProperties"},
20 "reset": {"#": "resetPenTool"} 33 "_strokeSize": {"@": "strokeSizeHT"}
21 } 34 }
22 } 35 }
23 } 36 }
@@ -26,9 +39,12 @@
26 </head> 39 </head>
27 40
28 <body> 41 <body>
29 <div id="penProperties" class="subToolHolderPanel"> 42 <div id="penProperties" class="subToolHolderPanel">
30 <button id="resetPenTool" tabindex="0" class="montage-button" aria-role="button" aria-busy="false">Reset</button> 43 <div id="strokesContainer" class="leftLabel" style="margin-left:25px; padding-top: 3px;">
44 <label class="label"> Stroke:</label>
45 <div id="strokeSize" class="label"></div>
31 </div> 46 </div>
47 </div>
32 </body> 48 </body>
33 49
34</html> \ No newline at end of file 50</html> \ No newline at end of file
diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.js b/js/components/tools-properties/pen-properties.reel/pen-properties.js
index ec8efa69..b57f9a6f 100644
--- a/js/components/tools-properties/pen-properties.reel/pen-properties.js
+++ b/js/components/tools-properties/pen-properties.reel/pen-properties.js
@@ -5,24 +5,10 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager;
10var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; 8var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
11 9
12exports.PenProperties = Montage.create(ToolProperties, { 10exports.PenProperties = Montage.create(ToolProperties, {
13 reset: { value: null }, 11 strokeSize: {
14 12 get: function() { return this._strokeSize; }
15 _subPrepare: {
16 value: function() {
17 this.reset.addEventListener("click", this, false);
18 }
19 },
20
21 handleClick: {
22 value: function(event) {
23 var newEvent = document.createEvent( "CustomEvent" );
24 newEvent.initCustomEvent( "resetPenTool", false, true );
25 defaultEventManager.dispatchEvent( newEvent );
26 }
27 } 13 }
28}); \ No newline at end of file 14}); \ No newline at end of file