aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/clipboard/internal-ops/elements-clipboard-agent.js16
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.js1
-rwxr-xr-xjs/components/menu/menu-entry.reel/menu-entry.js13
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.css2
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js30
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.css4
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.html191
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.js319
-rwxr-xr-xjs/components/ui/property-control.reel/property-control.js8
-rwxr-xr-xjs/controllers/elements/shapes-controller.js15
-rw-r--r--js/data/panels-data.js8
-rwxr-xr-xjs/document/views/base.js3
-rwxr-xr-xjs/document/views/design.js23
-rwxr-xr-xjs/helper-classes/3D/StageLine.js12
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js1
-rwxr-xr-xjs/helper-classes/3D/math-utils.js3
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/lib/drawing/world.js22
-rwxr-xr-xjs/lib/geom/circle.js128
-rwxr-xr-xjs/lib/geom/geom-obj.js25
-rwxr-xr-xjs/lib/geom/line.js57
-rwxr-xr-xjs/lib/geom/rectangle.js131
-rw-r--r--js/lib/geom/shape-primitive.js181
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js14
-rw-r--r--js/lib/rdge/materials/deform-material.js10
-rw-r--r--js/lib/rdge/materials/flag-material.js12
-rw-r--r--js/lib/rdge/materials/fly-material.js10
-rw-r--r--js/lib/rdge/materials/julia-material.js9
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js10
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js72
-rw-r--r--js/lib/rdge/materials/mandel-material.js9
-rwxr-xr-xjs/lib/rdge/materials/material.js29
-rw-r--r--js/lib/rdge/materials/plasma-material.js12
-rw-r--r--js/lib/rdge/materials/pulse-material.js12
-rw-r--r--js/lib/rdge/materials/radial-blur-material.js10
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js92
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js10
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js10
-rw-r--r--js/lib/rdge/materials/star-material.js10
-rw-r--r--js/lib/rdge/materials/taper-material.js29
-rw-r--r--js/lib/rdge/materials/tunnel-material.js10
-rw-r--r--js/lib/rdge/materials/twist-material.js10
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js14
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js17
-rw-r--r--js/lib/rdge/materials/water-material.js13
-rw-r--r--js/lib/rdge/materials/z-invert-material.js10
-rw-r--r--js/panels/Materials/materials-data.json5
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.css18
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html23
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js111
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.css44
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html26
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js408
-rwxr-xr-xjs/tools/LineTool.js4
-rwxr-xr-xjs/tools/OvalTool.js12
-rwxr-xr-xjs/tools/RectTool.js12
-rwxr-xr-xjs/tools/TextTool.js1
57 files changed, 1562 insertions, 731 deletions
diff --git a/js/clipboard/internal-ops/elements-clipboard-agent.js b/js/clipboard/internal-ops/elements-clipboard-agent.js
index 5c4b7d6f..4f6e8195 100644
--- a/js/clipboard/internal-ops/elements-clipboard-agent.js
+++ b/js/clipboard/internal-ops/elements-clipboard-agent.js
@@ -267,7 +267,10 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
267 styles = null; 267 styles = null;
268 } 268 }
269 269
270 var addDelegate = this.application.ninja.elementMediator.addDelegate;
271 this.application.ninja.elementMediator.addDelegate = null;
270 this.application.ninja.elementMediator.addElements(canvas, styles, false); 272 this.application.ninja.elementMediator.addElements(canvas, styles, false);
273 this.application.ninja.elementMediator.addDelegate = addDelegate;
271 274
272 worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null; 275 worldData = sourceCanvas.elementModel.shapeModel ? sourceCanvas.elementModel.shapeModel.GLWorld.exportJSON(): null;
273 if(worldData) 276 if(worldData)
@@ -349,7 +352,7 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
349 352
350 pastePositioned:{ 353 pastePositioned:{
351 value: function(element, styles, fromCopy){// for now can wok for both in-place and centered paste 354 value: function(element, styles, fromCopy){// for now can wok for both in-place and centered paste
352 var modObject = [], x,y, newX, newY, counter; 355 var modObject = [], x,y, newX, newY, counter, self = this;
353 356
354 if((typeof fromCopy === "undefined") || (fromCopy && fromCopy === true)){ 357 if((typeof fromCopy === "undefined") || (fromCopy && fromCopy === true)){
355 counter = this.pasteCounter; 358 counter = this.pasteCounter;
@@ -362,11 +365,22 @@ var ElementsClipboardAgent = exports.ElementsClipboardAgent = Montage.create(Com
362 newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px"; 365 newX = styles ? ("" + (styles.left + (25 * counter)) + "px") : "100px";
363 newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px"; 366 newY = styles ? ("" + (styles.top + (25 * counter)) + "px") : "100px";
364 367
368 var addDelegate = this.application.ninja.elementMediator.addDelegate;
369 this.application.ninja.elementMediator.addDelegate = null;
365 if(!styles || (styles && !styles.position)){ 370 if(!styles || (styles && !styles.position)){
366 this.application.ninja.elementMediator.addElements(element, null, false); 371 this.application.ninja.elementMediator.addElements(element, null, false);
367 }else if(styles && (styles.position === "absolute")){ 372 }else if(styles && (styles.position === "absolute")){
373 if((element.tagName === "IMG") || (element.getAttribute("type") === "image/svg+xml")){
374 element.onload = function(){
375 element.onload = null;
376 //refresh selection
377 self.application.ninja.stage.needsDraw = true;
378 }
379 }
380
368 this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace 381 this.application.ninja.elementMediator.addElements(element, {"top" : newY, "left" : newX}, false);//displace
369 } 382 }
383 this.application.ninja.elementMediator.addDelegate = addDelegate;
370 } 384 }
371 }, 385 },
372 386
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js
index f35a1fff..6e239f7d 100755
--- a/js/components/gradientpicker.reel/gradientpicker.js
+++ b/js/components/gradientpicker.reel/gradientpicker.js
@@ -172,6 +172,7 @@ exports.GradientPicker = Montage.create(Component, {
172 //Storing refereces to buttons and actual stop container 172 //Storing refereces to buttons and actual stop container
173 button.stop = stop; 173 button.stop = stop;
174 tooltip.stop = stop; 174 tooltip.stop = stop;
175 holder.stop = stop;
175 stop.button = button; 176 stop.button = button;
176 //Adding stop to container 177 //Adding stop to container
177 this.trackChips.appendChild(stop); 178 this.trackChips.appendChild(stop);
diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js
index 17f847d4..6c49af8f 100755
--- a/js/components/menu/menu-entry.reel/menu-entry.js
+++ b/js/components/menu/menu-entry.reel/menu-entry.js
@@ -102,10 +102,21 @@ exports.MenuEntry = Montage.create(Component, {
102 } 102 }
103 }, 103 },
104 104
105 toggleOnMenuItemAction: {
106 value: function() {
107 // TODO: Hack! Rework this!
108 //for non menu headers only
109 this.parentComponent.ownerComponent.toggleActivation(this);
110 }
111 },
112
105 captureMousedown: { 113 captureMousedown: {
106 value: function(event) { 114 value: function(event) {
107 // TODO: Hack! Rework this! 115 // TODO: Hack! Rework this!
108 this.parentComponent.ownerComponent.toggleActivation(this); 116 //for menu headers only
117 if(event.target.getAttribute("data-montage-id") === "topHeaderText"){
118 this.parentComponent.ownerComponent.toggleActivation(this);
119 }
109 } 120 }
110 }, 121 },
111 122
diff --git a/js/components/menu/menu-item.reel/menu-item.css b/js/components/menu/menu-item.reel/menu-item.css
index 298d706d..59f04675 100755
--- a/js/components/menu/menu-item.reel/menu-item.css
+++ b/js/components/menu/menu-item.reel/menu-item.css
@@ -33,10 +33,12 @@ POSSIBILITY OF SUCH DAMAGE.
33 font-size: 10pt; 33 font-size: 10pt;
34 padding: 3px 12px 3px 8px; 34 padding: 3px 12px 3px 8px;
35 text-shadow : 1px 1px 1px #000000; 35 text-shadow : 1px 1px 1px #000000;
36 cursor:pointer;
36} 37}
37 38
38.menuItem:hover { 39.menuItem:hover {
39 background-color: #7f7f7f;