aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/components/converter/string-units-converter.js2
-rw-r--r--js/components/converter/string-value-converter.js2
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js42
-rwxr-xr-xjs/components/tools-properties/pen-properties.reel/pen-properties.js27
-rwxr-xr-xjs/controllers/elements/body-controller.js9
-rwxr-xr-xjs/controllers/elements/controller-factory.js4
-rwxr-xr-xjs/controllers/elements/element-controller.js12
-rwxr-xr-xjs/controllers/elements/shapes-controller.js2
-rwxr-xr-xjs/controllers/selection-controller.js38
-rwxr-xr-xjs/controllers/styles-controller.js4
-rwxr-xr-xjs/data/menu-data.js12
-rwxr-xr-xjs/data/pi/pi-data.js10
-rwxr-xr-xjs/data/tools-data.js4
-rwxr-xr-xjs/document/document-html.js20
-rwxr-xr-xjs/document/helpers/webgl-helper.js14
-rwxr-xr-xjs/document/mediators/template.js100
-rwxr-xr-xjs/document/models/base.js81
-rwxr-xr-xjs/document/models/html.js55
-rwxr-xr-xjs/document/templates/banner/index.html47
-rwxr-xr-xjs/document/templates/html/index.html50
-rwxr-xr-xjs/document/views/design.js92
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js4
-rwxr-xr-xjs/helper-classes/3D/math-utils.js11
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js20
-rw-r--r--js/io/system/ninjalibrary.json2
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js5
-rwxr-xr-xjs/lib/NJUtils.js124
-rwxr-xr-xjs/lib/geom/brush-stroke.js1352
-rwxr-xr-xjs/lib/geom/sub-path.js331
-rwxr-xr-xjs/mediators/drag-drop-mediator.js2
-rwxr-xr-xjs/mediators/element-mediator.js35
-rw-r--r--js/mediators/io-mediator.js10
-rwxr-xr-xjs/mediators/keyboard-mediator.js7
-rwxr-xr-xjs/models/element-model.js100
-rwxr-xr-xjs/ninja.reel/ninja.html3
-rwxr-xr-xjs/ninja.reel/ninja.js20
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js52
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js22
-rwxr-xr-xjs/panels/properties.reel/properties.js4
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js2
-rw-r--r--js/panels/resize-composer.js5
-rwxr-xr-xjs/stage/layout.js6
-rwxr-xr-xjs/stage/stage.reel/stage.js149
-rw-r--r--js/tools/BrushTool.js17
-rwxr-xr-xjs/tools/EyedropperTool.js1
-rwxr-xr-xjs/tools/FillTool.js1
-rwxr-xr-xjs/tools/InkBottleTool.js1
-rwxr-xr-xjs/tools/LineTool.js109
-rwxr-xr-xjs/tools/PenTool.js445
-rwxr-xr-xjs/tools/Rotate3DToolBase.js2
-rwxr-xr-xjs/tools/SelectionTool.js6
-rwxr-xr-xjs/tools/ShapeTool.js51
-rwxr-xr-xjs/tools/TagTool.js15
-rwxr-xr-xjs/tools/TranslateObject3DTool.js2
-rwxr-xr-xjs/tools/drawing-tool.js3
-rwxr-xr-xjs/tools/modifier-tool-base.js2
56 files changed, 2117 insertions, 1431 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
10exports.StringUnitsConverter = Montage.create(Converter, { 10exports.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
10exports.StringValueConverter = Montage.create(Converter, { 10exports.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/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index d525c813..2f493102 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -56,22 +56,6 @@ exports.Breadcrumb = Montage.create(Component, {
56 } 56 }
57 }, 57 },
58 58
59 _container:{
60 value:null
61 },
62
63 container: {
64 set: function(value) {
65 if(this._container !== value) {
66 this._container = value;
67 this.createContainerElements();
68 }
69 },
70 get: function() {
71 return this._container;
72 }
73 },
74
75 containerElements: { 59 containerElements: {
76 value: [] 60 value: []
77 }, 61 },
@@ -79,31 +63,37 @@ exports.Breadcrumb = Montage.create(Component, {
79 prepareForDraw: { 63 prepareForDraw: {
80 value: function() { 64 value: function() {
81 this.breadcrumbBt.addEventListener("action", this, false); 65 this.breadcrumbBt.addEventListener("action", this, false);
66 this.addPropertyChangeListener("currentDocument.model.domContainer", this)
82 } 67 }
83 }, 68 },
84 69
85 createContainerElements: { 70 handleChange: {
86 value: function() { 71 value: function() {
87 var parentNode; 72 if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) {
73 this.createContainerElements(this.currentDocument.model.getProperty("domContainer"));
74 }
75 }
76 },
77
78 createContainerElements: {
79 value: function(container) {
88 80
89// delete this.containerElements; 81// delete this.containerElements;
90 this.containerElements = []; 82 this.containerElements = [];
91 83
92 parentNode = this.container; 84 while(container !== this.currentDocument.model.documentRoot) {
93 85 this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName});
94 while(parentNode !== this.currentDocument.model.documentRoot) { 86 container = container.parentNode;
95 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
96 parentNode = parentNode.parentNode;
97 } 87 }
98 88
99 // This is always the top container which is now hardcoded to body 89 // This is always the top container which is now hardcoded to body
100 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); 90 this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName});
101 } 91 }
102 }, 92 },
103 93
104 handleAction: { 94 handleAction: {