aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhwc4872012-04-26 13:04:25 -0700
committerhwc4872012-04-26 13:04:25 -0700
commit37f2d5230175c0fb9a4792f5e3d804f7604442e1 (patch)
treec8260f151270c6bdbe08869ebaeb837777c28d1b
parentf13d0f45f6b449764898e99db309c43b51a33476 (diff)
parent902dc18296fc78f3b8e67d952c42981d926bb2fc (diff)
downloadninja-37f2d5230175c0fb9a4792f5e3d804f7604442e1.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
-rw-r--r--assets/canvas-runtime.js40
-rw-r--r--images/cursors/penCursors/Pen_.pngbin0 -> 182 bytes
-rw-r--r--images/cursors/penCursors/Pen_anchorSelect.pngbin0 -> 268 bytes
-rw-r--r--images/cursors/penCursors/Pen_append.pngbin0 -> 210 bytes
-rw-r--r--images/cursors/penCursors/Pen_closePath.pngbin0 -> 211 bytes
-rw-r--r--images/cursors/penCursors/Pen_minus.pngbin0 -> 204 bytes
-rw-r--r--images/cursors/penCursors/Pen_newPath.pngbin0 -> 215 bytes
-rw-r--r--images/cursors/penCursors/Pen_plus.pngbin0 -> 211 bytes
-rw-r--r--images/cursors/penCursors/penAdd_OLD.png (renamed from images/cursors/penAdd.png)bin3043 -> 3043 bytes
-rwxr-xr-xjs/components/colorwheel.reel/colorwheel.html10
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.html10
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js25
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js1
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.html2
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css24
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html137
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js49
-rwxr-xr-xjs/components/tools-properties/pen-properties.reel/pen-properties.html2
-rwxr-xr-xjs/components/tree.reel/tree.css26
-rwxr-xr-xjs/components/tree.reel/tree.html28
-rwxr-xr-xjs/components/tree.reel/tree.js789
-rwxr-xr-xjs/components/tree.reel/treeDisclosure.pngbin995 -> 0 bytes
-rwxr-xr-xjs/components/tree.reel/treeFolderClosed.pngbin1345 -> 0 bytes
-rwxr-xr-xjs/components/tree.reel/treeFolderOpen.pngbin1323 -> 0 bytes
-rwxr-xr-xjs/components/tree.reel/treeItem.pngbin2935 -> 0 bytes
-rwxr-xr-xjs/components/ui/modalDialog/modal-dialog-manager.js123
-rwxr-xr-xjs/components/ui/modalDialog/modalDialogHeader.js82
-rwxr-xr-xjs/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.css30
-rwxr-xr-xjs/components/ui/modalDialog/modalDialogHeader.reel/modalDialogHeader.html33
-rwxr-xr-xjs/components/ui/radio-button.reel/radio-button.html32
-rwxr-xr-xjs/components/ui/radio-button.reel/radio-button.js44
-rwxr-xr-xjs/components/ui/row-renderer.reel/row-renderer.html37
-rwxr-xr-xjs/components/ui/row-renderer.reel/row-renderer.js18
-rwxr-xr-xjs/controllers/document-controller.js73
-rwxr-xr-xjs/controllers/elements/element-controller.js16
-rwxr-xr-xjs/controllers/elements/shapes-controller.js20
-rwxr-xr-xjs/controllers/elements/stage-controller.js2
-rwxr-xr-xjs/data/menu-data.js61
-rwxr-xr-xjs/document/controllers/document.js45
-rwxr-xr-xjs/document/document-html.js322
-rwxr-xr-xjs/document/document-text.js (renamed from js/document/controllers/base-controller.js)14
-rwxr-xr-xjs/document/html-document.js11
-rwxr-xr-xjs/document/mediators/io.js (renamed from js/document/mediators/base-mediator.js)14
-rwxr-xr-xjs/document/mediators/template.js (renamed from js/document/views/base-view.js)14
-rwxr-xr-xjs/document/models/base.js42
-rwxr-xr-xjs/document/models/html.js24
-rwxr-xr-xjs/document/models/text.js24
-rwxr-xr-xjs/document/templates/montage-web/default_html.css19
-rwxr-xr-xjs/document/templates/montage-web/index.html49
-rw-r--r--js/document/templates/montage-web/main.reel/main.js49
-rwxr-xr-xjs/document/templates/montage-web/package.json8
-rwxr-xr-xjs/document/views/base.js (renamed from js/document/models/base-model.js)14
-rwxr-xr-xjs/document/views/code.js25
-rwxr-xr-xjs/document/views/design.js25
-rwxr-xr-xjs/helper-classes/3D/vec-utils.js19
-rwxr-xr-xjs/helper-classes/3D/view-utils.js85
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/lib/drawing/world.js7
-rwxr-xr-xjs/lib/geom/anchor-point.js4
-rwxr-xr-xjs/lib/geom/brush-stroke.js16
-rwxr-xr-xjs/lib/geom/circle.js4
-rwxr-xr-xjs/lib/geom/rectangle.js20
-rwxr-xr-xjs/lib/geom/sub-path.js853
-rwxr-xr-xjs/mediators/drag-drop-mediator.js14
-rwxr-xr-xjs/ninja.reel/ninja.js29
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js21
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js1
-rwxr-xr-xjs/panels/properties.reel/properties.js5
-rwxr-xr-xjs/stage/stage.reel/stage.js4
-rwxr-xr-xjs/stage/tool-handle.js15
-rw-r--r--js/tools/BrushTool.js1
-rwxr-xr-xjs/tools/InkBottleTool.js22
-rwxr-xr-xjs/tools/PenTool.js1256
-rwxr-xr-xjs/tools/ToolBase.js12
-rwxr-xr-xjs/tools/drawing-tool-base.js2
-rw-r--r--manifest.json6
-rw-r--r--node_modules/montage/ui/flow.reel/flow.js1
-rw-r--r--node_modules/montage/ui/youtube-channel.reel/youtube-channel.html1
78 files changed, 2274 insertions, 2539 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index ee9f24a4..ce2a15de 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -685,14 +685,22 @@ NinjaCvsRt.RuntimeRectangle = function ()
685 // various declarations 685 // various declarations
686 var pt, rad, ctr, startPt, bPts; 686 var pt, rad, ctr, startPt, bPts;
687 var width = Math.round(this._width), 687 var width = Math.round(this._width),
688 height = Math.round(this._height); 688 height = Math.round(this._height),
689 689 hw = 0.5*width,
690 pt = [inset, inset]; // top left corner 690 hh = 0.5*height;
691 691
692 var tlRad = this._tlRadius; //top-left radius 692 pt = [inset, inset]; // top left corner
693 var trRad = this._trRadius; 693
694 var blRad = this._blRadius; 694 var tlRad = this._tlRadius; //top-left radius
695 var brRad = this._brRadius; 695 var trRad = this._trRadius;
696 var blRad = this._blRadius;
697 var brRad = this._brRadius;
698 // limit the radii to half the rectangle dimension
699 var minDimen = hw < hh ? hw : hh;
700 if (tlRad > minDimen) tlRad = minDimen;
701 if (blRad > minDimen) blRad = minDimen;
702 if (brRad > minDimen) brRad = minDimen;
703 if (trRad > minDimen) trRad = minDimen;
696 704
697 if ((tlRad <= 0) && (blRad <= 0) && (brRad <= 0) && (trRad <= 0)) 705 if ((tlRad <= 0) && (blRad <= 0) && (brRad <= 0) && (trRad <= 0))
698 { 706 {
@@ -769,7 +777,7 @@ NinjaCvsRt.RuntimeRectangle = function ()
769 var lw = this._strokeWidth; 777 var lw = this._strokeWidth;
770 var w = world.getViewportWidth(), 778 var w = world.getViewportWidth(),
771 h = world.getViewportHeight(); 779 h = world.getViewportHeight();
772 780
773 var c, 781 var c,
774 inset, 782 inset,
775 gradient, 783 gradient,
@@ -781,13 +789,13 @@ NinjaCvsRt.RuntimeRectangle = function ()
781 // render the fill 789 // render the fill
782 ctx.beginPath(); 790 ctx.beginPath();
783 if (this._fillColor) { 791 if (this._fillColor) {
784 inset = Math.ceil( lw ) + 0.5; 792 inset = Math.ceil( lw ) - 0.5;
785 793
786 if(this._fillColor.gradientMode) { 794 if(this._fillColor.gradientMode) {
787 if(this._fillColor.gradientMode === "radial") { 795 if(this._fillColor.gradientMode === "radial") {
788 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(w/2, h/2)-inset); 796 gradient = ctx.createRadialGradient(w/2, h/2, 0, w/2, h/2, Math.max(w, h)/2);
789 } else { 797 } else {
790 gradient = ctx.createLinearGradient(inset, h/2, w-2*inset, h/2); 798 gradient = ctx.createLinearGradient(inset/2, h/2, w-inset, h/2);
791 } 799 }
792 colors = this._fillColor.color; 800 colors = this._fillColor.color;
793 801
@@ -815,11 +823,11 @@ NinjaCvsRt.RuntimeRectangle = function ()
815 // render the stroke 823 // render the stroke
816 ctx.beginPath(); 824 ctx.beginPath();
817 if (this._strokeColor) { 825 if (this._strokeColor) {
818 inset = Math.ceil( 0.5*lw ) + 0.5; 826 inset = Math.ceil( 0.5*lw ) - 0.5;
819 827
820 if(this._strokeColor.gradientMode) { 828 if(this._strokeColor.gradientMode) {
821 if(this._strokeColor.gradientMode === "radial") { 829 if(this._strokeColor.gradientMode === "radial") {
822 gradient = ctx.createRadialGradient(w/2, h/2, Math.min(h/2, w/2)-inset, w/2, h/2, Math.max(h/2, w/2)); 830 gradient = ctx.createRadialGradient(w/2, h/2, Math.min(h, w)/2-inset, w/2, h/2, Math.max(h, w)/2);
823 } else { 831 } else {
824 gradient = ctx.createLinearGradient(0, h/2, w, h/2); 832 gradient = ctx.createLinearGradient(0, h/2, w, h/2);
825 } 833 }
@@ -1025,9 +1033,9 @@ NinjaCvsRt.RuntimeOval = function ()
1025 if(this._fillColor.gradientMode) { 1033 if(this._fillColor.gradientMode) {
1026 if(this._fillColor.gradientMode === "radial") { 1034 if(this._fillColor.gradientMode === "radial") {
1027 gradient = ctx.createRadialGradient(xCtr, yCtr, 0, 1035 gradient = ctx.createRadialGradient(xCtr, yCtr, 0,
1028 xCtr, yCtr, Math.max(yScale, xScale)); 1036 xCtr, yCtr, Math.max(this._width, this._height)/2);
1029 } else { 1037 } else {
1030 gradient = ctx.createLinearGradient(0, this._height/2, this._width, this._height/2); 1038 gradient = ctx.createLinearGradient(lineWidth/2, this._height/2, this._width-lineWidth, this._height/2);
1031 } 1039 }
1032 colors = this._fillColor.color; 1040 colors = this._fillColor.color;
1033 1041
diff --git a/images/cursors/penCursors/Pen_.png b/images/cursors/penCursors/Pen_.png
new file mode 100644
index 00000000..fea41116
--- /dev/null
+++ b/images/cursors/penCursors/Pen_.png
Binary files differ
diff --git a/images/cursors/penCursors/Pen_anchorSelect.png b/images/cursors/penCursors/Pen_anchorSelect.png
new file mode 100644
index 00000000..c05c2312
--- /dev/null
+++ b/images/cursors/penCursors/Pen_anchorSelect.png
Binary files differ
diff --git a/images/cursors/penCursors/Pen_append.png b/images/cursors