From 1e9af08f42e4ba18fc8c5a8501d8cbecec0f4fe8 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 21 Jun 2012 16:53:04 -0700 Subject: Replacing temp color chip pop This replaces the temporary color chip popup with a main popup used universally throughout the app. There are still outstanding issues to be addressed, this is just the initial set up before debugging issues. --- js/components/gradientpicker.reel/gradientpicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components') diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index 6071f3c6..6b50fae2 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js @@ -160,7 +160,7 @@ exports.GradientPicker = Montage.create(Component, { //Initialing button with color data button.color(data.color.mode, data.color.value); //Button popup data - button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, panel: true}; + button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, panel: true, history: false}; //Listening for color events from button button.addEventListener('change', this, false); //Dispatching event depending on type of mode -- cgit v1.2.3 From 0e7e32cadeb2002ee0c77c224b23aa00859f2183 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 22 Jun 2012 23:51:50 -0700 Subject: Added third gradient chip popup Need to add support for gradient events dispatching from standalone chips. Just need to hook up relays for events besides HSV to bubble up. --- js/components/gradientpicker.reel/gradientpicker.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/components') diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index 6b50fae2..9acd24ac 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js @@ -43,7 +43,7 @@ exports.GradientPicker = Montage.create(Component, { get: function() {return this._mode;}, set: function(value) { // - this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); + this.application.ninja.colorController.colorPopupManager.hideGradientChipPopup(); // this._mode = value; // @@ -132,7 +132,7 @@ exports.GradientPicker = Montage.create(Component, { value: function(data, silent) { if (this.application.ninja.colorController.colorPopupManager) { //Hiding any open popups (of gradient buttons) - this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); + this.application.ninja.colorController.colorPopupManager.hideGradientChipPopup(); //Creating stop elements var stop = document.createElement('div'), holder = document.createElement('div'), @@ -160,7 +160,7 @@ exports.GradientPicker = Montage.create(Component, { //Initialing button with color data button.color(data.color.mode, data.color.value); //Button popup data - button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, panel: true, history: false}; + button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, gradientPopup: true, history: false}; //Listening for color events from button button.addEventListener('change', this, false); //Dispatching event depending on type of mode @@ -263,7 +263,7 @@ exports.GradientPicker = Montage.create(Component, { // this._updating = true; // - this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); + this.application.ninja.colorController.colorPopupManager.hideGradientChipPopup(); // if (e._event.y > this._trackData.y+70 || e._event.y < this._trackData.y) { this.removeStop(this.currentStop); -- cgit v1.2.3 From 1005ff940d65a6717653d28b81d10564e4434dea Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 23 Jun 2012 19:20:11 -0700 Subject: Adding gradient mode to tools Tools need to implement using gradients on pre-flight mode, so right now this will only set/get color but will now apply on draw until tools are made to apply color. This should be filed as individual issues per tool. --- .../tools-properties/brush-properties.reel/brush-properties.js | 2 +- .../tools-properties/fill-properties.reel/fill-properties.js | 2 +- .../ink-bottle-properties.reel/ink-bottle-properties.js | 2 +- js/components/tools-properties/pen-properties.reel/pen-properties.js | 4 ++-- .../tools-properties/shape-properties.reel/shape-properties.js | 4 ++-- js/components/tools-properties/tag-properties.reel/tag-properties.js | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'js/components') diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js index 1af128af..d1f97260 100755 --- a/js/components/tools-properties/brush-properties.reel/brush-properties.js +++ b/js/components/tools-properties/brush-properties.reel/brush-properties.js @@ -74,7 +74,7 @@ var BrushProperties = exports.BrushProperties = Montage.create(ToolProperties, { Object.getPrototypeOf(BrushProperties).draw.call(this); if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { - this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._fillColorCtrl.props = {side: 'top', align: 'left', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: 8}; this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.js b/js/components/tools-properties/fill-properties.reel/fill-properties.js index ef1699af..11dec294 100755 --- a/js/components/tools-properties/fill-properties.reel/fill-properties.js +++ b/js/components/tools-properties/fill-properties.reel/fill-properties.js @@ -60,7 +60,7 @@ var FillProperties = exports.FillProperties = Montage.create(ToolProperties, { Object.getPrototypeOf(FillProperties).draw.call(this); if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { - this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._fillColorCtrl.props = {side: 'top', align: 'left', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: 8}; this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); 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 index 25823d11..9ae7c5bc 100755 --- 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 @@ -100,7 +100,7 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { // setup stroke color - this._strokeColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._strokeColorCtrl.props = {side: 'top', align: 'left', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: 8}; this.application.ninja.colorController.addButton("chip", this._strokeColorCtrl); this._strokeColorCtrl.addEventListener("change", this.handleStrokeColorChange.bind(this), false); diff --git a/js/components/tools-properties/pen-properties.reel/pen-properties.js b/js/components/tools-properties/pen-properties.reel/pen-properties.js index 78065b99..4f7e3474 100755 --- a/js/components/tools-properties/pen-properties.reel/pen-properties.js +++ b/js/components/tools-properties/pen-properties.reel/pen-properties.js @@ -111,11 +111,11 @@ var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { // setup fill color - this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._fillColorCtrl.props = {side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: -80}; this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); // setup stroke color - this._strokeColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._strokeColorCtrl.props = {side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: -80}; this.application.ninja.colorController.addButton("chip", this._strokeColorCtrl); this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); diff --git a/js/components/tools-properties/shape-properties.reel/shape-properties.js b/js/components/tools-properties/shape-properties.reel/shape-properties.js index 7306275a..e6b71f95 100755 --- a/js/components/tools-properties/shape-properties.reel/shape-properties.js +++ b/js/components/tools-properties/shape-properties.reel/shape-properties.js @@ -125,11 +125,11 @@ var ShapeProperties = exports.ShapeProperties = Montage.create(ToolProperties, { if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { // setup fill color - this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: -80 }; this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); // setup stroke color - this._strokeColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._strokeColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: -80 }; this.application.ninja.colorController.addButton("chip", this._strokeColorCtrl); this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js index d38419aa..ab745049 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.js +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js @@ -65,7 +65,7 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, { Object.getPrototypeOf(TagProperties).draw.call(this); if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { - this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: false, nocolor: true, offset: -80 }; this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); -- cgit v1.2.3 From b435e97ff312eea15086069ce0ab6991acac32ff Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 25 Jun 2012 11:52:28 -0700 Subject: Color Popup Test Candidate Preliminary check in for testing to commence on new color popup functionality. --- js/components/gradientpicker.reel/gradientpicker.js | 2 +- js/components/ui/color-chip.reel/color-chip.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'js/components') diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index 9acd24ac..853d77f9 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js @@ -160,7 +160,7 @@ exports.GradientPicker = Montage.create(Component, { //Initialing button with color data button.color(data.color.mode, data.color.value); //Button popup data - button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, gradientPopup: true, history: false}; + button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: false, gradient: false, image: false, offset: -84, gradientPopup: true, history: false}; //Listening for color events from button button.addEventListener('change', this, false); //Dispatching event depending on type of mode diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js index a684d0db..dd786d15 100755 --- a/js/components/ui/color-chip.reel/color-chip.js +++ b/js/components/ui/color-chip.reel/color-chip.js @@ -82,7 +82,11 @@ var ColorChip = exports.ColorChip = Montage.create(Component, { // This is a single chip - Not related to the color panel -- Set the initial color if found var mode = "rgb", r = 0, g = 0, b = 0, a = 1, css = "rgb(0,0,0)"; - if(this.color) { + if(this.color && this.color.color) { + var g = this.color.color; + g.wasSetByCode = true; + this.chipBtn.color(this.color.mode, g); + } else if (this.color) { var colorObj = this.application.ninja.colorController.getColorObjFromCss(this.color.css); mode = colorObj.mode; r = colorObj.value.r; -- cgit v1.2.3 From 221995c36dbb24c7b2a2691c0fead7e578bfc5a8 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 27 Jun 2012 16:50:58 -0700 Subject: Fixing IKNINJA-1634 --- js/components/gradientpicker.reel/gradientpicker.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/components') diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index 853d77f9..f912eb51 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js @@ -147,6 +147,7 @@ exports.GradientPicker = Montage.create(Component, { stop.addEventListener('mouseup', this, false); //Storing refereces to buttons and actual stop container button.stop = stop; + tooltip.stop = stop; stop.button = button; //Adding stop to container this.trackChips.appendChild(stop); -- cgit v1.2.3 From c5204cc96a08413d48bd8148034189b6f710ade9 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 28 Jun 2012 16:24:24 -0700 Subject: Changing the livePreview button to do a chromePreview and keeping the canvas when doing a timeline play Signed-off-by: Valerio Virgillito --- js/components/layout/stage-mode.reel/stage-mode.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/components') diff --git a/js/components/layout/stage-mode.reel/stage-mode.js b/js/components/layout/stage-mode.reel/stage-mode.js index cb42276b..b772d688 100755 --- a/js/components/layout/stage-mode.reel/stage-mode.js +++ b/js/components/layout/stage-mode.reel/stage-mode.js @@ -9,17 +9,17 @@ var Montage = require("montage/core/core").Montage, exports.StageMode = Montage.create(Component, { - _livePreview: { + _chromePreview: { value: null }, - livePreview: { + chromePreview: { get: function() { - return this._livePreview; + return this._chromePreview; }, set: function(value) { - if(value !== this._livePreview) { - this._livePreview = value; + if(value !== this._chromePreview) { + this._chromePreview = value; this.needsDraw = true; } } @@ -46,7 +46,7 @@ exports.StageMode = Montage.create(Component, { handleClick: { value: function(event) { - this.livePreview = !this.livePreview; + this.chromePreview = !this.chromePreview; } } }); \ No newline at end of file -- cgit v1.2.3