From 04343eda8c2f870b0da55cfdc8003c99fe1cc4de Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:53:10 -0700 Subject: Remove trailing spaces --- js/panels/color/colorbutton-manager.js | 2 +- .../color/colorpanelbase.reel/colorpanelbase.js | 66 +++++++++++----------- .../color/colorpanelpopup.reel/colorpanelpopup.js | 4 +- js/panels/color/colorpopup-manager.js | 28 ++++----- 4 files changed, 50 insertions(+), 50 deletions(-) (limited to 'js/panels/color') diff --git a/js/panels/color/colorbutton-manager.js b/js/panels/color/colorbutton-manager.js index 0f793b44..0f1ce4a0 100755 --- a/js/panels/color/colorbutton-manager.js +++ b/js/panels/color/colorbutton-manager.js @@ -27,7 +27,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + //////////////////////////////////////////////////////////////////////// // var Montage = require("montage/core/core").Montage, diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js index a3525d0f..b7fbb859 100755 --- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js +++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js @@ -559,7 +559,7 @@ exports.ColorPanelBase = Montage.create(Component, { this.drawButtonNoColor(button, button.getElementsByTagName('canvas')[0]); } break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'fillicon': button.innerHTML = ''; this._buttons.fill.push(button); @@ -572,7 +572,7 @@ exports.ColorPanelBase = Montage.create(Component, { button.className = button.className + ' selected'; } break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'stroke': this._buttons.stroke.push(button); button.style.cursor = 'pointer'; @@ -602,7 +602,7 @@ exports.ColorPanelBase = Montage.create(Component, { //this.selectInputHighlight(this._buttons['stroke'], this._buttons['fill'], false, true); } break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'strokeicon': button.innerHTML = ''; this._buttons.stroke.push(button); @@ -615,7 +615,7 @@ exports.ColorPanelBase = Montage.create(Component, { button.className = button.className + ' selected'; } break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'current': this._buttons.current.push(button); button.style.cursor = 'default'; @@ -636,7 +636,7 @@ exports.ColorPanelBase = Montage.create(Component, { } } break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'previous': this._buttons.previous.push(button); button.addEventListener('click', this.setPreviousColor.bind(this)); @@ -657,49 +657,49 @@ exports.ColorPanelBase = Montage.create(Component, { } } break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'mlabel1': this._buttons.mlabel1.push(button); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'mlabel2': this._buttons.mlabel2.push(button); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'mlabel3': this._buttons.mlabel3.push(button); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'rgbmode': this._buttons.rgbmode.push(button); button.title = 'Color Mode: RGB'; button.addEventListener('click', this.rgbMode.bind(this)); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hslmode': this._buttons.hslmode.push(button); button.title = 'Color Mode: HSL'; button.addEventListener('click', this.hslMode.bind(this)); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'reset': this._buttons.reset.push(button); button.title = 'Default Colors'; button.addEventListener('click', this.applyDefaultColors.bind(this)); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'nocolor': this._buttons.nocolor.push(button); button.title = 'No Color'; button.addEventListener('click', function () {this.setNoColor(false)}.bind(this)); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'swap': this._buttons.swap.push(button); button.title = 'Swap Colors'; button.addEventListener('click', this.swapColors.bind(this)); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hexinput': var hexinp = HotText.create(); hexinp.element = button; @@ -709,7 +709,7 @@ exports.ColorPanelBase = Montage.create(Component, { this._buttons.hexinput.push(hexinp); return hexinp; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// default: console.log("ERROR: An error occured, the button '" + button + "' has an invalid type of " + type + "."); break; @@ -768,7 +768,7 @@ exports.ColorPanelBase = Montage.create(Component, { this._updateSliders(e); for (i = 0; this._buttons.rgbmode[i]; i++) { this._buttons.rgbmode[i].className = 'cp_rgb_mode selected'; - //this._buttons.rgbmode[i].classList.add('selected'); + //this._buttons.rgbmode[i].classList.add('selected'); } for (i = 0; this._buttons.hslmode[i]; i++) { this._buttons.hslmode[i].className = 'cp_hsl_mode'; @@ -808,7 +808,7 @@ exports.ColorPanelBase = Montage.create(Component, { } for (i = 0; this._buttons.hslmode[i]; i++) { this._buttons.hslmode[i].className = 'cp_hsl_mode selected'; - //this._buttons.hslmode[i].classList.add('selected'); + //this._buttons.hslmode[i].classList.add('selected'); } for (i = 0; this._buttons.mlabel1[i]; i++) { this._buttons.mlabel1[i].innerHTML = 'H'; @@ -848,31 +848,31 @@ exports.ColorPanelBase = Montage.create(Component, { this.colorManager.alpha = { value: stroke.a, type: 'change', wasSetByCode: false }; // switch (stroke.m) { - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'rgb': this.colorManager.rgb = stroke.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hsv': this.colorManager.hsv = stroke.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hsl': this.colorManager.hsl = stroke.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hex': this.colorManager.hex = stroke.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'gradient': this.colorManager.gradient = stroke.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// default: this.setNoColor(false); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// } //////////////////////////////////////////////////////////// // @@ -880,31 +880,31 @@ exports.ColorPanelBase = Montage.create(Component, { this.colorManager.alpha = { value: fill.a, type: 'change', wasSetByCode: false }; // switch (fill.m) { - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'rgb': this.colorManager.rgb = fill.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hsv': this.colorManager.hsv = fill.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hsl': this.colorManager.hsl = fill.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'hex': this.colorManager.hex = fill.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// case 'gradient': this.colorManager.gradient = fill.c; break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// default: this.setNoColor(false); break; - //////////////////////////////////////////////////////// + //////////////////////////////////////////////////////// } // //Updating all hex input areas @@ -1011,7 +1011,7 @@ exports.ColorPanelBase = Montage.create(Component, { if (!e._event.wasSetByCode) { // if (!e.target.cInputType) { - type = 'hottext'; + type = 'hottext'; } else { type = 'slider' } @@ -1580,7 +1580,7 @@ exports.ColorPanelBase = Montage.create(Component, { ctx.lineTo(2, 1); ctx.stroke(); } else { - //Adding class to buttons with no canvas + //Adding class to buttons with no canvas selected[i].className = selected[i].className + ' selected'; } } diff --git a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js index 6511cddc..44f8b513 100755 --- a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js +++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js @@ -58,7 +58,7 @@ exports.ColorPanelPopup = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // _components: { - value: null + value: null }, //////////////////////////////////////////////////////////////////// // @@ -220,7 +220,7 @@ exports.ColorPanelPopup = Montage.create(Component, { didDraw: { value: function() { // - + } }, //////////////////////////////////////////////////////////////////// diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js index f0b8060a..5667fbe7 100755 --- a/js/panels/color/colorpopup-manager.js +++ b/js/panels/color/colorpopup-manager.js @@ -27,7 +27,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + //////////////////////////////////////////////////////////////////////// // var Montage = require("montage/core/core").Montage, @@ -45,7 +45,7 @@ exports.ColorPopupManager = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // _hasCloseEvents: { - value: false + value: false }, //////////////////////////////////////////////////////////////////// // @@ -81,7 +81,7 @@ exports.ColorPopupManager = Montage.create(Component, { value: function (e) { // this.closeAllPopups(e); - } + } }, //////////////////////////////////////////////////////////////////// // @@ -89,7 +89,7 @@ exports.ColorPopupManager = Montage.create(Component, { value: function (e) { // this.hideColorPopup(); - } + } }, //////////////////////////////////////////////////////////////////// // @@ -121,7 +121,7 @@ exports.ColorPopupManager = Montage.create(Component, { this.hideColorPopup(); } } - } + } }, //////////////////////////////////////////////////////////////////// // @@ -129,11 +129,11 @@ exports.ColorPopupManager = Montage.create(Component, { value: function (element, e) { //Prevent any action for button to handle toggling if (e._event.target.inputType || e._event.target.colorMode) return true; - //Storing limits of popup + //Storing limits of popup var top, bottom, left, right; //Checking for popup to be opened otherwise nothing happens if (element && element.opened && element.popup && element.popup.element) { - //Getting horizontal limits + //Getting horizontal limits left = parseInt(element.popup.element.style.left) + parseInt(element.popup.element.style.marginLeft); right = left + parseInt(element.popup.element.offsetWidth); //Getting vertical limits @@ -151,7 +151,7 @@ exports.ColorPopupManager = Montage.create(Component, { //Hides popups since element not detected return false; } - } + } }, //////////////////////////////////////////////////////////////////// // @@ -239,7 +239,7 @@ exports.ColorPopupManager = Montage.create(Component, { // this._popupBase.needsDraw = true; this._popupBase.addEventListener('firstDraw', this, false); - } + } } }, //////////////////////////////////////////////////////////////////// @@ -648,11 +648,11 @@ exports.ColorPopupManager = Montage.create(Component, { this._popupChipBase._components.hex.value = null; } else if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) { if (!isNaN(e._target._numValue)) { - this._popupChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; + this._popupChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; } this.colorChipChange(e); } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'nocolor')) { - this.colorChipChange(e); + this.colorChipChange(e); } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'hex')) { this.colorChipChange(e); } @@ -668,7 +668,7 @@ exports.ColorPopupManager = Montage.create(Component, { this._popupChipBase._components.hex.value = null; } else if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) { if (!isNaN(e._target._numValue)) { - this._popupGradientChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; + this._popupGradientChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; } this.colorGradientChipChange(e); } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'hex')) { @@ -677,7 +677,7 @@ exports.ColorPopupManager = Montage.create(Component, { } else { if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) { if (!isNaN(e._target._numValue)) { - this._popupGradientChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; + this._popupGradientChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; } this.colorGradientChipChange(e); } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'hex')) { @@ -716,7 +716,7 @@ exports.ColorPopupManager = Montage.create(Component, { } //Converting color to RGB to update buttons background colors (affecting only view) var color = this.colorManager.hsvToRgb(e._event.hsv.h/(Math.PI*2), e._event.hsv.s, e._event.hsv.v), i, input = this.colorManager.input; - + if (input === 'chip') { var ctx, cvs = this.application.ninja.colorController.colorView.currentChip.getElementsByTagName('canvas')[0]; //if (cvs && color) { -- cgit v1.2.3