From f4df8204a57e1bc6021b651ebb2259f9931cf26f Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Tue, 22 May 2012 13:21:32 -0700 Subject: allow changes in the pen subtool in options to be seen by the pen tool code (can now select the pen plus, pen minus subtools) AND add keyboard shortcut for brush tool --- .../pen-properties.reel/pen-properties.js | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'js/components') 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 cd205e07..aba6cb61 100755 --- a/js/components/tools-properties/pen-properties.reel/pen-properties.js +++ b/js/components/tools-properties/pen-properties.reel/pen-properties.js @@ -9,6 +9,17 @@ var ToolProperties = require("js/components/tools-properties/tool-properties").T var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { addedColorChips: { value: false }, + _penToolRadio: { value: null, enumerable: false }, + _penPlusRadio: { value: null, enumerable: false }, + _penMinusRadio: { value: null, enumerable: false }, + + _subPrepare: { + value: function() { + this._penToolRadio.addEventListener("click", this, false); + this._penPlusRadio.addEventListener("click", this, false); + this._penMinusRadio.addEventListener("click", this, false); + } + }, _fill: { enumerable: false, @@ -50,6 +61,23 @@ var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { } }, + _selectedSubtool: { + value: "pen", enumerable: false + }, + + selectedSubtool: { + get: function() { return this._selectedSubtool;}, + set: function(value) { this._selectedSubtool = value; } + }, + + handleClick: { + value: function(event) { + this._selectedSubtool = event._event.target.value; + console.log("handleClick changing pen tool subtool to "+this.selectedSubtool); + NJevent("penSubToolChange"); + } + }, + draw: { enumerable: false, value: function () { -- cgit v1.2.3 From e2ae637582b8e02125086201a64ee85761b01093 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Tue, 29 May 2012 14:24:47 -0700 Subject: More consistent local and global mouse coords which solves a bug with the Pen minus subtool not removing 1 anchor paths --- js/components/tools-properties/pen-properties.reel/pen-properties.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/components') 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 aba6cb61..c37359e1 100755 --- a/js/components/tools-properties/pen-properties.reel/pen-properties.js +++ b/js/components/tools-properties/pen-properties.reel/pen-properties.js @@ -73,7 +73,6 @@ var PenProperties = exports.PenProperties = Montage.create(ToolProperties, { handleClick: { value: function(event) { this._selectedSubtool = event._event.target.value; - console.log("handleClick changing pen tool subtool to "+this.selectedSubtool); NJevent("penSubToolChange"); } }, -- cgit v1.2.3 From c82ac0c0a0120f45c9bb4a42bdd2502d0cc77bdb Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 21:38:25 -0700 Subject: cleanup and making the webgl-helper only loop canvas on file save Signed-off-by: Valerio Virgillito --- js/components/converter/string-units-converter.js | 2 -- js/components/converter/string-value-converter.js | 2 -- 2 files changed, 4 deletions(-) (limited to 'js/components') diff --git a/js/components/converter/string-units-converter.js b/js/components/converter/string-units-converter.js index 6b97d5c5..9f6e4112 100644 --- a/js/components/converter/string-units-converter.js +++ b/js/components/converter/string-units-converter.js @@ -9,7 +9,6 @@ var Montage = require("montage").Montage, exports.StringUnitsConverter = Montage.create(Converter, { - // convert fahrenheit to celsius (showing our non-metric heritage here) convert: { value: function(value) { if(value) { @@ -20,7 +19,6 @@ exports.StringUnitsConverter = Montage.create(Converter, { } }, - // revert celsius to fahrenheit revert: { value: function(value) { console.log("revert string to unit ", value); diff --git a/js/components/converter/string-value-converter.js b/js/components/converter/string-value-converter.js index 28d7dd29..f397f731 100644 --- a/js/components/converter/string-value-converter.js +++ b/js/components/converter/string-value-converter.js @@ -9,7 +9,6 @@ var Montage = require("montage").Montage, exports.StringValueConverter = Montage.create(Converter, { - // convert fahrenheit to celsius (showing our non-metric heritage here) convert: { value: function(value) { console.log(value); @@ -18,7 +17,6 @@ exports.StringValueConverter = Montage.create(Converter, { } }, - // revert celsius to fahrenheit revert: { value: function(value) { console.log("revert string to value ", value); -- cgit v1.2.3