aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-06 00:27:59 -0700
committerValerio Virgillito2012-06-06 00:27:59 -0700
commit91123fef348ec54d89005adbc151e816856a6a18 (patch)
treeac20e473f2ef52ef1f7deb18eab4d38d6a35ec4b /js
parent0e1a276f19ea70009c5a649e9667861d7c346a7e (diff)
parent18e212dca48066d1ddaca96875a3f40adcc859b6 (diff)
downloadninja-91123fef348ec54d89005adbc151e816856a6a18.tar.gz
Merge branch 'refs/heads/master' into montage-v10-integration
Conflicts: js/components/tools-properties/fill-properties.reel/fill-properties.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.html41
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.js39
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css15
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html116
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js28
-rwxr-xr-xjs/controllers/document-controller.js26
-rwxr-xr-xjs/controllers/elements/component-controller.js4
-rwxr-xr-xjs/controllers/elements/element-controller.js94
-rwxr-xr-xjs/controllers/elements/shapes-controller.js101
-rwxr-xr-xjs/document/mediators/template.js756
-rwxr-xr-xjs/document/models/base.js21
-rw-r--r--js/document/templates/app/main.js51
-rwxr-xr-xjs/document/views/design.js14
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js2
-rw-r--r--js/io/system/ninjalibrary.js42
-rwxr-xr-xjs/mediators/element-mediator.js88
-rw-r--r--js/mediators/io-mediator.js712
-rwxr-xr-xjs/ninja.reel/ninja.js41
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js96
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js56
-rwxr-xr-xjs/tools/FillTool.js32
-rwxr-xr-xjs/tools/InkBottleTool.js49
-rwxr-xr-xjs/tools/SelectionTool.js112
23 files changed, 1450 insertions, 1086 deletions
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.html b/js/components/tools-properties/fill-properties.reel/fill-properties.html
index 734966dc..ca447b8b 100755
--- a/js/components/tools-properties/fill-properties.reel/fill-properties.html
+++ b/js/components/tools-properties/fill-properties.reel/fill-properties.html
@@ -11,10 +11,35 @@
11 11
12 <script type="text/montage-serialization"> 12 <script type="text/montage-serialization">
13 { 13 {
14 "_fillMaterialCB": { 14 "useFillColor": {
15 "prototype": "montage/ui/checkbox.reel",
16 "properties": {
17 "element": {"#": "useFillColor"},
18 "identifier": "useFillColor",
19 "checked": true
20 }
21 },
22
23 "useWebGL": {
24 "prototype": "montage/ui/checkbox.reel",
25 "properties": {
26 "element": {"#": "useWebGL"},
27 "identifier": "useWebGL",
28 "checked": false
29 },
30 "listeners": [
31 {
32 "type": "action",
33 "listener": {"@": "owner"},
34 "capture": false
35 }
36 ]
37 },
38
39 "fillMaterial": {
15 "prototype": "js/components/combobox.reel", 40 "prototype": "js/components/combobox.reel",
16 "properties": { 41 "properties": {
17 "element": {"#": "fillMaterialCB"}, 42 "element": {"#": "fillMaterial"},
18 "labelField": "_name", 43 "labelField": "_name",
19 "dataField": "_name" 44 "dataField": "_name"
20 } 45 }
@@ -24,11 +49,12 @@
24 "properties": { 49 "properties": {
25 "element": {"#": "fillProperties"}, 50 "element": {"#": "fillProperties"},
26 51
52 "useFillColor": {"@": "useFillColor"},
27 "_fillColorCtrl": {"#": "fillColorCtrl"}, 53 "_fillColorCtrl": {"#": "fillColorCtrl"},
28 54
29 "_useWebGL": {"#": "useWebGLCH"}, 55 "useWebGL": {"@": "useWebGL"},
30 "_materialsContainer": {"#": "materialsContainer"}, 56 "_materialsContainer": {"#": "materialsContainer"},
31 "_fillMaterial": {"@": "_fillMaterialCB"} 57 "fillMaterial": {"@": "fillMaterial"}
32 } 58 }
33 } 59 }
34 } 60 }
@@ -38,16 +64,17 @@
38 64
39 <body> 65 <body>
40 <div data-montage-id="fillProperties" class="subToolHolderPanel optionsFillTool toolOptionsFloatChildren"> 66 <div data-montage-id="fillProperties" class="subToolHolderPanel optionsFillTool toolOptionsFloatChildren">
67 <input data-montage-id="useFillColor" type="checkbox" name="useFillColorControl" class="nj-skinned"/>
41 <div class="toolColorChipIcon FillTool"></div> 68 <div class="toolColorChipIcon FillTool"></div>
42 <div data-montage-id="fillColorCtrl" class="toolColorChipCtrl"></div> 69 <div data-montage-id="fillColorCtrl" class="toolColorChipCtrl"></div>
43 <div class="nj-divider divider-vertical toolOptionsSpacer">&nbsp;</div> 70 <div class="nj-divider divider-vertical toolOptionsSpacer">&nbsp;</div>
44 71
45 <input data-montage-id="useWebGLCH" type="checkbox" name="useWebGLControl" class="nj-skinned"/> 72 <input data-montage-id="useWebGL" type="checkbox" name="useWebGLControl" class="nj-skinned"/>
46 <label class="label">Use WebGL</label> 73 <label class="label">Use WebGL</label>
47 <div data-montage-id="materialsContainer" class="materialsContainerOptions toolOptionsFloatChildren"> 74 <div data-montage-id="materialsContainer" class="materialsContainerOptions toolOptionsFloatChildren" style="display:none;">
48 <label class="label">Material:</label> 75 <label class="label">Material:</label>
49 <div data-montage-id="fillIcon" class="toolColorChipIcon FillTool"></div> 76 <div data-montage-id="fillIcon" class="toolColorChipIcon FillTool"></div>
50 <select data-montage-id="fillMaterialCB" class="nj-skinned"> 77 <select data-montage-id="fillMaterial" class="nj-skinned">
51 </select> 78 </select>
52 </div> 79 </div>
53 </div> 80 </div>
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.js b/js/components/tools-properties/fill-properties.reel/fill-properties.js
index 616badb0..7331b375 100755
--- a/js/components/tools-properties/fill-properties.reel/fill-properties.js
+++ b/js/components/tools-properties/fill-properties.reel/fill-properties.js
@@ -10,27 +10,6 @@ var Montage = require("montage/core/core").Montage,
10 10
11var FillProperties = exports.FillProperties = Montage.create(ToolProperties, { 11var FillProperties = exports.FillProperties = Montage.create(ToolProperties, {
12 12
13 _fillColorCtrl: {
14 value: null,
15 serializable: true
16 },
17
18 _useWebGL: {
19 value: null,
20 serializable: true
21 },
22
23 _materialsContainer: {
24 value: null,
25 serializable: true
26 },
27
28 _fillMaterial: {
29 value: null,
30 serializable: true
31 },
32
33 _use3D: { value: false },
34 addedColorChips: { value: false }, 13 addedColorChips: { value: false },
35 14
36 _fill: { 15 _fill: {
@@ -79,29 +58,17 @@ var FillProperties = exports.FillProperties = Montage.create(ToolProperties, {
79 58
80 _subPrepare: { 59 _subPrepare: {
81 value: function() { 60 value: function() {
82 Object.defineBinding(this._fillMaterial, "items", { 61 Object.defineBinding(this.fillMaterial, "items", {
83 boundObject: this.application.ninja.appModel, 62 boundObject: this.application.ninja.appModel,
84 boundObjectPropertyPath: "materials", 63 boundObjectPropertyPath: "materials",
85 oneway: false 64 oneway: false
86 }); 65 });
87
88 this.handleChange(null);
89 this._useWebGL.addEventListener("change", this, false);
90 } 66 }
91 }, 67 },
92 68
93 handleChange: { 69 handleAction: {
94 value: function(event) { 70 value: function(event) {
95 if(this._useWebGL.checked) 71 (this.useWebGL.checked) ? this._materialsContainer.style["display"] = "" : this._materialsContainer.style["display"] = "none";
96 {
97 this._use3D = true;
98 this._materialsContainer.style["display"] = "";
99 }
100 else
101 {
102 this._use3D = false;
103 this._materialsContainer.style["display"] = "none";
104 }
105 } 72 }
106 } 73 }
107}); \ No newline at end of file 74}); \ No newline at end of file
diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css
index 3dba17b6..dae64eb3 100755
--- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css
+++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css
@@ -8,18 +8,3 @@