diff options
Diffstat (limited to 'js')
61 files changed, 5127 insertions, 1654 deletions
diff --git a/js/components/converter/string-units-converter.js b/js/components/converter/string-units-converter.js index 6b97d5c5..9f6e4112 100644 --- a/js/components/converter/string-units-converter.js +++ b/js/components/converter/string-units-converter.js | |||
@@ -9,7 +9,6 @@ var Montage = require("montage").Montage, | |||
9 | 9 | ||
10 | exports.StringUnitsConverter = Montage.create(Converter, { | 10 | exports.StringUnitsConverter = Montage.create(Converter, { |
11 | 11 | ||
12 | // convert fahrenheit to celsius (showing our non-metric heritage here) | ||
13 | convert: { | 12 | convert: { |
14 | value: function(value) { | 13 | value: function(value) { |
15 | if(value) { | 14 | if(value) { |
@@ -20,7 +19,6 @@ exports.StringUnitsConverter = Montage.create(Converter, { | |||
20 | } | 19 | } |
21 | }, | 20 | }, |
22 | 21 | ||
23 | // revert celsius to fahrenheit | ||
24 | revert: { | 22 | revert: { |
25 | value: function(value) { | 23 | value: function(value) { |
26 | console.log("revert string to unit ", value); | 24 | console.log("revert string to unit ", value); |
diff --git a/js/components/converter/string-value-converter.js b/js/components/converter/string-value-converter.js index 28d7dd29..f397f731 100644 --- a/js/components/converter/string-value-converter.js +++ b/js/components/converter/string-value-converter.js | |||
@@ -9,7 +9,6 @@ var Montage = require("montage").Montage, | |||
9 | 9 | ||
10 | exports.StringValueConverter = Montage.create(Converter, { | 10 | exports.StringValueConverter = Montage.create(Converter, { |
11 | 11 | ||
12 | // convert fahrenheit to celsius (showing our non-metric heritage here) | ||
13 | convert: { | 12 | convert: { |
14 | value: function(value) { | 13 | value: function(value) { |
15 | console.log(value); | 14 | console.log(value); |
@@ -18,7 +17,6 @@ exports.StringValueConverter = Montage.create(Converter, { | |||
18 | } | 17 | } |
19 | }, | 18 | }, |
20 | 19 | ||
21 | // revert celsius to fahrenheit | ||
22 | revert: { | 20 | revert: { |
23 | value: function(value) { | 21 | value: function(value) { |
24 | console.log("revert string to value ", value); | 22 | console.log("revert string to value ", value); |
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 cd205e07..c37359e1 100755 --- a/js/components/tools-properties/pen-properties.reel/pen-properties.js +++ b/js/components/tools-properties/pen-properties.reel/pen-properties.js | |||
@@ -9,6 +9,17 @@ var ToolProperties = require("js/components/tools-properties/tool-properties").T | |||
9 | 9 | ||
10 | var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { | 10 | var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { |
11 | addedColorChips: { value: false }, | 11 | addedColorChips: { value: false }, |
12 | _penToolRadio: { value: null, enumerable: false }, | ||
13 | _penPlusRadio: { value: null, enumerable: false }, | ||
14 | _penMinusRadio: { value: null, enumerable: false }, | ||
15 | |||
16 | _subPrepare: { | ||
17 | value: function() { | ||
18 | this._penToolRadio.addEventListener("click", this, false); | ||
19 | this._penPlusRadio.addEventListener("click", this, false); | ||
20 | this._penMinusRadio.addEventListener("click", this, false); | ||
21 | } | ||
22 | }, | ||
12 | 23 | ||
13 | _fill: { | 24 | _fill: { |
14 | enumerable: false, | 25 | enumerable: false, |
@@ -50,6 +61,22 @@ var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { | |||
50 | } | 61 | } |
51 | }, | 62 | }, |
52 | 63 | ||
64 | _selectedSubtool: { | ||
65 | value: "pen", enumerable: false | ||
66 | }, | ||
67 | |||
68 | selectedSubtool: { | ||
69 | get: function() { return this._selectedSubtool;}, | ||
70 | set: function(value) { this._selectedSubtool = value; } | ||
71 | }, | ||
72 | |||
73 | handleClick: { | ||
74 | value: function(event) { | ||
75 | this._selectedSubtool = event._event.target.value; | ||
76 | NJevent("penSubToolChange"); | ||
77 | } | ||
78 | }, | ||
79 | |||
53 | draw: { | 80 | draw: { |
54 | enumerable: false, | 81 | enumerable: false, |
55 | value: function () { | 82 | value: function () { |
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 7a3a66f5..0dc11b82 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js | |||
@@ -30,7 +30,8 @@ exports.BodyController = Montage.create(ElementController, { | |||
30 | value: function(el, p) { | 30 | value: function(el, p) { |
31 | switch(p) { | 31 | switch(p) { |
32 | case "background" : | 32 | case "background" : |
33 | return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true)); | 33 | case "background-color": |
34 | return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color")); | ||
34 | case "border": | 35 | case "border": |
35 | return 0; | 36 | return 0; |
36 | case "height": | 37 | case "height": |
@@ -47,8 +48,8 @@ exports.BodyController = Montage.create(ElementController, { | |||
47 | setProperty: { | 48 | setProperty: { |
48 | value: function(el, p, value) { | 49 | value: function(el, p, value) { |
49 | switch(p) { | 50 | switch(p) { |
50 | case "body-background": | ||
51 | case "background": | 51 | case "background": |
52 | case "background-color": | ||
52 | this.application.ninja.stylesController.setElementStyle(el, "background-color", value); | 53 | this.application.ninja.stylesController.setElementStyle(el, "background-color", value); |
53 | break; | 54 | break; |
54 | case "overflow": | 55 | case "overflow": |
@@ -71,7 +72,7 @@ exports.BodyController = Montage.create(ElementController, { | |||