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/fill-properties.reel/fill-properties.html41
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.js19
-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/components/tools-properties/pen-properties.reel/pen-properties.js27
-rwxr-xr-xjs/controllers/document-controller.js22
-rwxr-xr-xjs/controllers/elements/body-controller.js9
-rwxr-xr-xjs/controllers/elements/controller-factory.js4
-rwxr-xr-xjs/controllers/elements/element-controller.js106
-rwxr-xr-xjs/controllers/elements/shapes-controller.js103
-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
-rw-r--r--js/document/templates/app/main.js1
-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.js123
-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.js28
-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.js33
-rwxr-xr-xjs/tools/InkBottleTool.js50
-rwxr-xr-xjs/tools/LineTool.js109
-rwxr-xr-xjs/tools/PenTool.js445
-rwxr-xr-xjs/tools/Rotate3DToolBase.js2
-rwxr-xr-xjs/tools/SelectionTool.js118
-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
63 files changed, 2534 insertions, 1708 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 ac131f2c..260922b3 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -51,22 +51,6 @@ exports.Breadcrumb = Montage.create(Component, {
51 } 51 }
52 }, 52 },
53 53
54 _container:{
55 value:null
56 },
57
58 container: {
59 set: function(value) {
60 if(this._container !== value) {
61 this._container = value;
62 this.createContainerElements();
63 }
64 },
65 get: function() {
66 return this._container;
67 }
68 },
69
70 containerElements: { 54 containerElements: {
71 value: [] 55 value: []
72 }, 56 },
@@ -74,31 +58,37 @@ exports.Breadcrumb = Montage.create(Component, {
74 prepareForDraw: { 58 prepareForDraw: {
75 value: function() { 59 value: function() {
76 this.breadcrumbBt.addEventListener("action", this, false); 60 this.breadcrumbBt.addEventListener("action", this, false);
61 this.addPropertyChangeListener("currentDocument.model.domContainer", this)
77 } 62 }
78 }, 63 },
79 64
80 createContainerElements: { 65 handleChange: {
81 value: function() { 66 value: function() {
82 var parentNode; 67 if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) {
68 this.createContainerElements(this.currentDocument.model.getProperty("domContainer"));
69 }
70 }
71 },
72
73 createContainerElements: {
74 value: function(container) {
83 75
84// delete this.containerElements; 76// delete this.containerElements;
85 this.containerElements = []; 77 this.containerElements = [];
86 78
87 parentNode = this.container; 79 while(container !== this.currentDocument.model.documentRoot) {
88 80 this.containerElements.unshift({"node": container, "nodeUuid":container.uuid, "label": container.nodeName});
89 while(parentNode !== this.currentDocument.model.documentRoot) { 81 container = container.parentNode;
90 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName});
91 parentNode = parentNode.parentNode;
92 } 82 }
93 83
94 // This is always the top container which is now hardcoded to body