From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/components/tools-properties/brush-properties.reel/brush-properties.css | 0 .../tools-properties/brush-properties.reel/brush-properties.html | 0 js/components/tools-properties/brush-properties.reel/brush-properties.js | 0 .../tools-properties/eraser-properties.reel/eraser-properties.css | 0 .../tools-properties/eraser-properties.reel/eraser-properties.html | 0 .../tools-properties/eraser-properties.reel/eraser-properties.js | 0 .../tools-properties/eyedropper-properties.reel/eyedropper-properties.css | 0 .../eyedropper-properties.reel/eyedropper-properties.html | 0 .../tools-properties/eyedropper-properties.reel/eyedropper-properties.js | 0 js/components/tools-properties/fill-properties.reel/fill-properties.css | 0 js/components/tools-properties/fill-properties.reel/fill-properties.html | 0 js/components/tools-properties/fill-properties.reel/fill-properties.js | 0 .../tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css | 0 .../ink-bottle-properties.reel/ink-bottle-properties.html | 0 .../tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js | 0 js/components/tools-properties/line-properties.reel/line-properties.css | 0 js/components/tools-properties/line-properties.reel/line-properties.html | 0 js/components/tools-properties/line-properties.reel/line-properties.js | 0 .../tools-properties/object3d-properties.reel/object3d-properties.html | 0 .../tools-properties/object3d-properties.reel/object3d-properties.js | 0 js/components/tools-properties/oval-properties.reel/oval-properties.css | 0 js/components/tools-properties/oval-properties.reel/oval-properties.html | 0 js/components/tools-properties/oval-properties.reel/oval-properties.js | 0 js/components/tools-properties/pan-properties.reel/pan-properties.css | 0 js/components/tools-properties/pan-properties.reel/pan-properties.html | 0 js/components/tools-properties/pan-properties.reel/pan-properties.js | 0 js/components/tools-properties/pen-properties.reel/pen-properties.css | 0 js/components/tools-properties/pen-properties.reel/pen-properties.html | 0 js/components/tools-properties/pen-properties.reel/pen-properties.js | 0 .../tools-properties/pencil-properties.reel/pencil-properties.css | 0 .../tools-properties/pencil-properties.reel/pencil-properties.html | 0 .../tools-properties/pencil-properties.reel/pencil-properties.js | 0 js/components/tools-properties/rect-properties.reel/rect-properties.css | 0 js/components/tools-properties/rect-properties.reel/rect-properties.html | 0 js/components/tools-properties/rect-properties.reel/rect-properties.js | 0 .../rotate-stage-properties.reel/rotate-stage-properties.css | 0 .../rotate-stage-properties.reel/rotate-stage-properties.html | 0 .../rotate-stage-properties.reel/rotate-stage-properties.js | 0 .../tools-properties/selection-properties.reel/selection-properties.css | 0 .../tools-properties/selection-properties.reel/selection-properties.html | 0 .../tools-properties/selection-properties.reel/selection-properties.js | 0 js/components/tools-properties/shape-properties.reel/shape-properties.css | 0 .../tools-properties/shape-properties.reel/shape-properties.html | 0 js/components/tools-properties/shape-properties.reel/shape-properties.js | 0 .../subselection-properties.reel/subselection-properties.html | 0 .../subselection-properties.reel/subselection-properties.js | 0 js/components/tools-properties/tag-properties.reel/tag-properties.css | 0 js/components/tools-properties/tag-properties.reel/tag-properties.html | 0 js/components/tools-properties/tag-properties.reel/tag-properties.js | 0 js/components/tools-properties/text-properties.reel/text-properties.css | 0 js/components/tools-properties/text-properties.reel/text-properties.html | 0 js/components/tools-properties/text-properties.reel/text-properties.js | 0 js/components/tools-properties/tool-properties.js | 0 js/components/tools-properties/zoom-properties.reel/zoom-properties.css | 0 js/components/tools-properties/zoom-properties.reel/zoom-properties.html | 0 js/components/tools-properties/zoom-properties.reel/zoom-properties.js | 0 56 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 js/components/tools-properties/brush-properties.reel/brush-properties.css mode change 100644 => 100755 js/components/tools-properties/brush-properties.reel/brush-properties.html mode change 100644 => 100755 js/components/tools-properties/brush-properties.reel/brush-properties.js mode change 100644 => 100755 js/components/tools-properties/eraser-properties.reel/eraser-properties.css mode change 100644 => 100755 js/components/tools-properties/eraser-properties.reel/eraser-properties.html mode change 100644 => 100755 js/components/tools-properties/eraser-properties.reel/eraser-properties.js mode change 100644 => 100755 js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.css mode change 100644 => 100755 js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.html mode change 100644 => 100755 js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.js mode change 100644 => 100755 js/components/tools-properties/fill-properties.reel/fill-properties.css mode change 100644 => 100755 js/components/tools-properties/fill-properties.reel/fill-properties.html mode change 100644 => 100755 js/components/tools-properties/fill-properties.reel/fill-properties.js mode change 100644 => 100755 js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css mode change 100644 => 100755 js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html mode change 100644 => 100755 js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js mode change 100644 => 100755 js/components/tools-properties/line-properties.reel/line-properties.css mode change 100644 => 100755 js/components/tools-properties/line-properties.reel/line-properties.html mode change 100644 => 100755 js/components/tools-properties/line-properties.reel/line-properties.js mode change 100644 => 100755 js/components/tools-properties/object3d-properties.reel/object3d-properties.html mode change 100644 => 100755 js/components/tools-properties/object3d-properties.reel/object3d-properties.js mode change 100644 => 100755 js/components/tools-properties/oval-properties.reel/oval-properties.css mode change 100644 => 100755 js/components/tools-properties/oval-properties.reel/oval-properties.html mode change 100644 => 100755 js/components/tools-properties/oval-properties.reel/oval-properties.js mode change 100644 => 100755 js/components/tools-properties/pan-properties.reel/pan-properties.css mode change 100644 => 100755 js/components/tools-properties/pan-properties.reel/pan-properties.html mode change 100644 => 100755 js/components/tools-properties/pan-properties.reel/pan-properties.js mode change 100644 => 100755 js/components/tools-properties/pen-properties.reel/pen-properties.css mode change 100644 => 100755 js/components/tools-properties/pen-properties.reel/pen-properties.html mode change 100644 => 100755 js/components/tools-properties/pen-properties.reel/pen-properties.js mode change 100644 => 100755 js/components/tools-properties/pencil-properties.reel/pencil-properties.css mode change 100644 => 100755 js/components/tools-properties/pencil-properties.reel/pencil-properties.html mode change 100644 => 100755 js/components/tools-properties/pencil-properties.reel/pencil-properties.js mode change 100644 => 100755 js/components/tools-properties/rect-properties.reel/rect-properties.css mode change 100644 => 100755 js/components/tools-properties/rect-properties.reel/rect-properties.html mode change 100644 => 100755 js/components/tools-properties/rect-properties.reel/rect-properties.js mode change 100644 => 100755 js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.css mode change 100644 => 100755 js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.html mode change 100644 => 100755 js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.js mode change 100644 => 100755 js/components/tools-properties/selection-properties.reel/selection-properties.css mode change 100644 => 100755 js/components/tools-properties/selection-properties.reel/selection-properties.html mode change 100644 => 100755 js/components/tools-properties/selection-properties.reel/selection-properties.js mode change 100644 => 100755 js/components/tools-properties/shape-properties.reel/shape-properties.css mode change 100644 => 100755 js/components/tools-properties/shape-properties.reel/shape-properties.html mode change 100644 => 100755 js/components/tools-properties/shape-properties.reel/shape-properties.js mode change 100644 => 100755 js/components/tools-properties/subselection-properties.reel/subselection-properties.html mode change 100644 => 100755 js/components/tools-properties/subselection-properties.reel/subselection-properties.js mode change 100644 => 100755 js/components/tools-properties/tag-properties.reel/tag-properties.css mode change 100644 => 100755 js/components/tools-properties/tag-properties.reel/tag-properties.html mode change 100644 => 100755 js/components/tools-properties/tag-properties.reel/tag-properties.js mode change 100644 => 100755 js/components/tools-properties/text-properties.reel/text-properties.css mode change 100644 => 100755 js/components/tools-properties/text-properties.reel/text-properties.html mode change 100644 => 100755 js/components/tools-properties/text-properties.reel/text-properties.js mode change 100644 => 100755 js/components/tools-properties/tool-properties.js mode change 100644 => 100755 js/components/tools-properties/zoom-properties.reel/zoom-properties.css mode change 100644 => 100755 js/components/tools-properties/zoom-properties.reel/zoom-properties.html mode change 100644 => 100755 js/components/tools-properties/zoom-properties.reel/zoom-properties.js (limited to 'js/components/tools-properties') diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.css b/js/components/tools-properties/brush-properties.reel/brush-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.html b/js/components/tools-properties/brush-properties.reel/brush-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/eraser-properties.reel/eraser-properties.css b/js/components/tools-properties/eraser-properties.reel/eraser-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/eraser-properties.reel/eraser-properties.html b/js/components/tools-properties/eraser-properties.reel/eraser-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/eraser-properties.reel/eraser-properties.js b/js/components/tools-properties/eraser-properties.reel/eraser-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.css b/js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.html b/js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.js b/js/components/tools-properties/eyedropper-properties.reel/eyedropper-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.css b/js/components/tools-properties/fill-properties.reel/fill-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.html b/js/components/tools-properties/fill-properties.reel/fill-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.js b/js/components/tools-properties/fill-properties.reel/fill-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/line-properties.reel/line-properties.css b/js/components/tools-properties/line-properties.reel/line-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/line-properties.reel/line-properties.html b/js/components/tools-properties/line-properties.reel/line-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/line-properties.reel/line-properties.js b/js/components/tools-properties/line-properties.reel/line-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/object3d-properties.reel/object3d-properties.html b/js/components/tools-properties/object3d-properties.reel/object3d-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/object3d-properties.reel/object3d-properties.js b/js/components/tools-properties/object3d-properties.reel/object3d-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/oval-properties.reel/oval-properties.css b/js/components/tools-properties/oval-properties.reel/oval-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/oval-properties.reel/oval-properties.html b/js/components/tools-properties/oval-properties.reel/oval-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/oval-properties.reel/oval-properties.js b/js/components/tools-properties/oval-properties.reel/oval-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pan-properties.reel/pan-properties.css b/js/components/tools-properties/pan-properties.reel/pan-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pan-properties.reel/pan-properties.html b/js/components/tools-properties/pan-properties.reel/pan-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pan-properties.reel/pan-properties.js b/js/components/tools-properties/pan-properties.reel/pan-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.css b/js/components/tools-properties/pen-properties.reel/pen-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.html b/js/components/tools-properties/pen-properties.reel/pen-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.js b/js/components/tools-properties/pen-properties.reel/pen-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pencil-properties.reel/pencil-properties.css b/js/components/tools-properties/pencil-properties.reel/pencil-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pencil-properties.reel/pencil-properties.html b/js/components/tools-properties/pencil-properties.reel/pencil-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/pencil-properties.reel/pencil-properties.js b/js/components/tools-properties/pencil-properties.reel/pencil-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.css b/js/components/tools-properties/rect-properties.reel/rect-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.js b/js/components/tools-properties/rect-properties.reel/rect-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.css b/js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.html b/js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.js b/js/components/tools-properties/rotate-stage-properties.reel/rotate-stage-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/selection-properties.reel/selection-properties.css b/js/components/tools-properties/selection-properties.reel/selection-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/selection-properties.reel/selection-properties.html b/js/components/tools-properties/selection-properties.reel/selection-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/selection-properties.reel/selection-properties.js b/js/components/tools-properties/selection-properties.reel/selection-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/shape-properties.reel/shape-properties.css b/js/components/tools-properties/shape-properties.reel/shape-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/shape-properties.reel/shape-properties.html b/js/components/tools-properties/shape-properties.reel/shape-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/shape-properties.reel/shape-properties.js b/js/components/tools-properties/shape-properties.reel/shape-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/subselection-properties.reel/subselection-properties.html b/js/components/tools-properties/subselection-properties.reel/subselection-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/subselection-properties.reel/subselection-properties.js b/js/components/tools-properties/subselection-properties.reel/subselection-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.css b/js/components/tools-properties/tag-properties.reel/tag-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/text-properties.reel/text-properties.css b/js/components/tools-properties/text-properties.reel/text-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/text-properties.reel/text-properties.html b/js/components/tools-properties/text-properties.reel/text-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/tool-properties.js b/js/components/tools-properties/tool-properties.js old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/zoom-properties.reel/zoom-properties.css b/js/components/tools-properties/zoom-properties.reel/zoom-properties.css old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/zoom-properties.reel/zoom-properties.html b/js/components/tools-properties/zoom-properties.reel/zoom-properties.html old mode 100644 new mode 100755 diff --git a/js/components/tools-properties/zoom-properties.reel/zoom-properties.js b/js/components/tools-properties/zoom-properties.reel/zoom-properties.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 0bb13001ce07e5256a6e395325a898ab4ac93e1c Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 13 Feb 2012 02:05:07 -0800 Subject: Fixed Color on text edit. Also Fixed Indent & Outdent button. toggle bullet and numbered now bound to text tool --- .../text-properties.reel/text-properties.css | 4 + .../text-properties.reel/text-properties.html | 8 +- .../text-properties.reel/text-properties.js | 116 +++++++++++++++++---- 3 files changed, 103 insertions(+), 25 deletions(-) (limited to 'js/components/tools-properties') diff --git a/js/components/tools-properties/text-properties.reel/text-properties.css b/js/components/tools-properties/text-properties.reel/text-properties.css index 6aa61812..f7bb8295 100644 --- a/js/components/tools-properties/text-properties.reel/text-properties.css +++ b/js/components/tools-properties/text-properties.reel/text-properties.css @@ -12,6 +12,10 @@ padding: 0px 8px; } +.optionsTextTool select { + margin: 2px; +} + .optionsTextTool > *, .optionsTextTool .btnGroup > * { float:left; } diff --git a/js/components/tools-properties/text-properties.reel/text-properties.html b/js/components/tools-properties/text-properties.reel/text-properties.html index 7ded1236..a7d2af10 100644 --- a/js/components/tools-properties/text-properties.reel/text-properties.html +++ b/js/components/tools-properties/text-properties.reel/text-properties.html @@ -236,7 +236,7 @@ "element": {"#": "indent"}, "pressedClass": "active", "preventFocus": true, - "identifier": "outdent", + "identifier": "indent", "label": ">>" }, "listeners": [ @@ -253,7 +253,7 @@ "element": {"#": "outdent"}, "pressedClass": "active", "preventFocus": true, - "identifier": "<<", + "identifier": "outdent", "label": "<<" }, "listeners": [ @@ -310,10 +310,10 @@ - + - +
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js index 55274322..7ae0cfda 100644 --- a/js/components/tools-properties/text-properties.reel/text-properties.js +++ b/js/components/tools-properties/text-properties.reel/text-properties.js @@ -6,6 +6,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; +var ArrayController = require("montage/ui/controller/array-controller").ArrayController; var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; exports.TextProperties = Montage.create(ToolProperties, { @@ -29,18 +30,57 @@ exports.TextProperties = Montage.create(ToolProperties, { outdent: {value: null}, numberedList: {value: null}, bulletedList: {value: null}, + fontTypes: {value: null}, + fontSizes: {value: null}, prepareForDraw: { value: function() { + // code commented out because montage ui element select-input is incomplete. Will switch back when they fix or actually complete the component +// this.fontTypes = Montage.create(ArrayController); +// this.fontTypes.content = [ +// { value: "Arial", text: "Arial" }, +// { value: "Arial Black", text: "Arial Black" }, +// { value: "Courier New", text: "Courier New" }, +// { value: "Garamond", text: "Garamond" }, +// { value: "Georgia", text: "Georgia" }, +// { value: "Open Sans", text: "Open Sans" }, +// { value: "Tahoma", text: "Tahoma" }, +// { value: "Times New Roman", text: "Times New Roman" }, +// { value: "Trebuchet MS", text: "Trebuchet MS" }, +// { value: "Verdana", text: "Verdana" } +// ]; + + //this.fontSelection.contentController = this.fontTypes; +// +// this.fontSizes = Montage.create(ArrayController); +// this.fontSizes.content = [ +// { value: 1, text: "8pt" }, +// { value: 2, text: "10pt" }, +// { value: 3, text: "12pt" }, +// { value: 4, text: "14pt" }, +// { value: 5, text: "18pt" }, +// { value: 6, text: "24pt" }, +// { value: 7, text: "36pt" } +// ]; +// this.fontSize.contentController = this.fontSizes; + this.fontSelection.items = ["Arial", "Arial Black", "Courier New", "Garamond", "Georgia", "Open Sans", "Tahoma", "Times New Roman", "Trebuchet MS", "Verdana"]; - this.tagType.items = ["div", "span", "p", "section", "article", "h1", "h2", "h3", "h4", "h5", "h6"]; this.fontSize.items = ["8pt","10pt","12pt","14pt","18pt","24pt","36pt"]; + this.tagType.items = ["div", "span", "p", "section", "article", "h1", "h2", "h3", "h4", "h5", "h6"]; } }, handleEditorSelect: { value: function(e) { this.application.ninja.stage.textTool.updateStates(); +// this.fontSelection.value = this.application.ninja.stage.textTool.states.fontname; +// +// for( var i = 0; i < this.fontSize.items.length; i++) { +// if (this.application.ninja.stage.textTool.states.fontsize == i + 1) { +// this.fontSize.value = this.fontSize.items[i] +// break; +// } +// } } }, @@ -133,6 +173,18 @@ exports.TextProperties = Montage.create(ToolProperties, { } }, + handleBulletedListAction: { + value: function(e) { + this.application.ninja.stage.textTool.doAction("insertunorderedlist"); + } + }, + + handleNumberedListAction: { + value: function(e) { + this.application.ninja.stage.textTool.doAction("insertorderedlist"); + } + }, + handleFontSizeChange: { value: function(e) { //We need the index of whats selected. This is a temporary solution til we can have a variable amount for font-size. @@ -214,6 +266,34 @@ exports.TextProperties = Montage.create(ToolProperties, { oneway: true }); + Object.defineBinding(this.numberedList, "pressed", { + boundObject: this.application.ninja.stage.textTool, + boundObjectPropertyPath: "states.insertorderedlist", + boundValueMutator: this.validatePressed, + oneway: true + }); + + Object.defineBinding(this.bulletedList, "pressed", { + boundObject: this.application.ninja.stage.textTool, + boundObjectPropertyPath: "states.insertunorderedlist", + boundValueMutator: this.validatePressed, + oneway: true + }); + + Object.defineBinding(this.fontSelection, "value", { + boundObject: this.application.ninja.stage.textTool, + boundObjectPropertyPath: "states.fontname", + boundValueMutator: this.validateFont, + oneway: true + }); + + Object.defineBinding(this.fontSize, "value", { + boundObject: this.application.ninja.stage.textTool, + boundObjectPropertyPath: "states.fontsize", + boundValueMutator: this.validateFontSize.bind(this), + oneway: true + }); + this.initialized = true; } @@ -226,40 +306,34 @@ exports.TextProperties = Montage.create(ToolProperties, { } }, - initialized: { - value: false + validateFont: { + value: function(val) { + return val; + } }, - handleFontSelectionChange: { - value: function() { - this.application.ninja.stage.textTool.doAction("fontname", this.fontSelection.value); - this.application.ninja.stage.textTool.element.focus(); + validateFontSize: { + value: function(val) { + val = parseInt(val); + return this.fontSize.items[val]; } }, - handleNumberedListAction: { - value: function(e) { - //this.numberedList.value = false; - this.bulletedList.value = false; - this.application.ninja.stage.textTool.doAction("insertorderedlist"); - this.application.ninja.stage.textTool.element.focus(); - } + initialized: { + value: false }, - handleBulletedListAction: { + handleFontSelectionChange: { value: function(e) { - this.numberedList.value = false; - //this.bulletedList.value = false; - this.application.ninja.stage.textTool.doAction("insertunorderedlist"); + this.application.ninja.stage.textTool.doAction("fontname", this.fontSelection.value); this.application.ninja.stage.textTool.element.focus(); } }, handleFontColorChange: { value: function(e) { - this.application.ninja.stage.textTool.element.style.color = e._event.color.css; - this.application.ninja.stage.textTool.element.focus(); - + this.application.ninja.stage.textTool.element.firstChild.style.color = e._event.color.css; + this.application.ninja.stage.textTool.element.firstChild.focus(); //this.application.ninja.stage.textTool.doAction("forecolor",e._event.color.css); } -- cgit v1.2.3 From 36cefa3526988cb4dfea107fedaa954a2703260d Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 13 Feb 2012 02:20:23 -0800 Subject: Fixed binding to font size dropdown --- js/components/tools-properties/text-properties.reel/text-properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/tools-properties') diff --git a/js/components/tools-properties/text-properties.reel/text-properties.js b/js/components/tools-properties/text-properties.reel/text-properties.js index 7ae0cfda..88d38ffe 100644 --- a/js/components/tools-properties/text-properties.reel/text-properties.js +++ b/js/components/tools-properties/text-properties.reel/text-properties.js @@ -315,7 +315,7 @@ exports.TextProperties = Montage.create(ToolProperties, { validateFontSize: { value: function(val) { val = parseInt(val); - return this.fontSize.items[val]; + return this.fontSize.items[val - 1]; } }, -- cgit v1.2.3