diff options
author | Ananya Sen | 2012-04-26 12:57:56 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-26 12:57:56 -0700 |
commit | b2132103b12e499f26e6e0f311d48555a9f733ff (patch) | |
tree | 2eaa000b460e4be3c8050a369318584b2591e8d7 | |
parent | 07c611323c109aaa2208ebc15a354b81c3f04a0d (diff) | |
parent | 902dc18296fc78f3b8e67d952c42981d926bb2fc (diff) | |
download | ninja-b2132103b12e499f26e6e0f311d48555a9f733ff.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Conflicts:
js/controllers/document-controller.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
57 files changed, 2268 insertions, 1275 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/penCursors/Pen_append.png new file mode 100644 index 00000000..1dbb959f --- /dev/null +++ b/images/cursors/penCursors/Pen_append.png | |||
Binary files differ | |||
diff --git a/images/cursors/penCursors/Pen_closePath.png b/images/cursors/penCursors/Pen_closePath.png new file mode 100644 index 00000000..8447ddbc --- /dev/null +++ b/images/cursors/penCursors/Pen_closePath.png | |||
Binary files differ | |||
diff --git a/images/cursors/penCursors/Pen_minus.png b/images/cursors/penCursors/Pen_minus.png new file mode 100644 index 00000000..41fe47d8 --- /dev/null +++ b/images/cursors/penCursors/Pen_minus.png | |||
Binary files differ | |||
diff --git a/images/cursors/penCursors/Pen_newPath.png b/images/cursors/penCursors/Pen_newPath.png new file mode 100644 index 00000000..547731f3 --- /dev/null +++ b/images/cursors/penCursors/Pen_newPath.png | |||
Binary files differ | |||
diff --git a/images/cursors/penCursors/Pen_plus.png b/images/cursors/penCursors/Pen_plus.png new file mode 100644 index 00000000..192c71fe --- /dev/null +++ b/images/cursors/penCursors/Pen_plus.png | |||
Binary files differ | |||
diff --git a/images/cursors/penAdd.png b/images/cursors/penCursors/penAdd_OLD.png index c306cc85..c306cc85 100644 --- a/images/cursors/penAdd.png +++ b/images/cursors/penCursors/penAdd_OLD.png | |||
Binary files differ | |||
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index f35972b6..597577f1 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -63,16 +63,27 @@ exports.Breadcrumb = Montage.create(Component, { | |||
63 | 63 | ||
64 | parentNode = this.container; | 64 | parentNode = this.container; |
65 | 65 | ||
66 | while(parentNode.id !== "UserContent") { | 66 | // This is for the old template support. |
67 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK | ||
68 | if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") { | ||
69 | while(parentNode.id !== "UserContent") { | ||
70 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
71 | parentNode = parentNode.parentNode; | ||
72 | } | ||
73 | |||
74 | // This is always the top container which is now hardcoded to body | ||
75 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); | ||
76 | } else { | ||
77 |