+
+
+
+
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 1caabc35..32063d9a 100755
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.js
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js
@@ -8,7 +8,7 @@ var Montage = require("montage/core/core").Montage;
var Component = require("montage/ui/component").Component;
var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
-exports.TagProperties = Montage.create(ToolProperties, {
+var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
divElement: { value: null, enumerable: false },
imageElement: { value: null, enumerable: false },
videoElement: { value: null, enumerable: false },
@@ -17,6 +17,24 @@ exports.TagProperties = Montage.create(ToolProperties, {
classField: { value: null, enumerable: false },
customName: { value: null, enumerable: false },
customLabel: { value: null, enumerable: false },
+ addedColorChips: { value: false },
+
+ _fill: {
+ enumerable: false,
+ value: { colorMode: 'nocolor', color: null, webGlColor: null }
+ },
+
+ fill: {
+ enumerable: true,
+ get: function () {
+ return this._fill;
+ },
+ set: function (value) {
+ if (value !== this._fill) {
+ this._fill = value;
+ }
+ }
+ },
_subPrepare: {
value: function() {
@@ -31,6 +49,33 @@ exports.TagProperties = Montage.create(ToolProperties, {
}
},
+ draw: {
+ enumerable: false,
+ value: function () {
+ 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.application.ninja.colorController.addButton("chip", this._fillColorCtrl);
+
+ this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false);
+
+ this.addedColorChips = true;
+ }
+
+ if (this.addedColorChips) {
+ this._fillColorCtrl.color(this._fill.colorMode, this._fill.color);
+ }
+ }
+ },
+
+ handleFillColorChange: {
+ value: function (e) {
+ this.fill = e._event;
+ this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color);
+ }
+ },
+
handleClick: {
value: function(event) {
this.selectedElement = event._event.target.id;
diff --git a/js/components/ui/color-chip.reel/color-chip.css b/js/components/ui/color-chip.reel/color-chip.css
index da75c41e..7c7135a2 100755
--- a/js/components/ui/color-chip.reel/color-chip.css
+++ b/js/components/ui/color-chip.reel/color-chip.css
@@ -19,13 +19,3 @@
padding: 0;
background: none;
}
-
-.colortoolbar .chipContainer {
- margin: 1px 1px 1px 1px !important;
- width: 40px !important;
- height: 20px !important;
- border: 0;
- padding: 0;
- background-image: url(../../../../images/colorpanel/transparent.png) !important;
- background-repeat: repeat !important;
-}
\ No newline at end of file
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js
index c6d664cf..d4737aad 100755
--- a/js/controllers/color-controller.js
+++ b/js/controllers/color-controller.js
@@ -9,7 +9,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
var Montage = require("montage/core/core").Montage,
Component = require("montage/ui/component").Component,
ColorModel = require("js/models/color-model").ColorModel,
- ColorToolbar = require("js/panels/Color/colortoolbar.reel").ColorToolbar,
ColorPanelBase = require("js/panels/Color/colorpanelbase.reel").ColorPanelBase,
ElementsMediator = require("js/mediators/element-mediator").ElementMediator,
ColorPopupManager = require("js/panels/Color/colorpopup-manager").ColorPopupManager,
@@ -368,20 +367,5 @@ exports.ColorController = Montage.create(Component, {
//Must be a valid CSS or null will be returned
return color;
}
- },
- ////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////
- //TODO: Remove, add via toolbar repetition
- createToolbar: {
- enumerable: true,
- value: function () {
- this.colorToolbar = ColorToolbar.create();
- this.colorToolbar.element = document.getElementById("colortoolbar");
- this.colorToolbar.needsDraw = true;
- }
}
- ////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////
});
\ No newline at end of file
diff --git a/js/data/tools-data.js b/js/data/tools-data.js
index 4d009530..ac6fe6e5 100755
--- a/js/data/tools-data.js
+++ b/js/data/tools-data.js
@@ -124,17 +124,6 @@ exports.ToolsData = Montage.create(Montage, {
}],
"selected": false
},
- {
- "id": "PencilTool",
- "properties": "pencilProperties",
- "spriteSheet": true,
- "action": "PencilTool",
- "toolTip": "Pencil Tool",
- "cursor": "auto",
- "lastInGroup": false,
- "container": false,
- "selected": false
- },
{
"id": "BrushTool",
"properties": "brushProperties",
@@ -163,22 +152,11 @@ exports.ToolsData = Montage.create(Montage, {
"spriteSheet": true,
"action": "InkBottleTool",
"toolTip": "Ink Bottle Tool (K)",
- "cursor": "url('images/tools/inkbottle_down.png'), default",
+ "cursor": "url('images/tools/inkbottle_cursor.png'), default",
"lastInGroup": true,
"container": false,
"selected": false
},
- {
- "id": "EyedropperTool",
- "properties": "eyedropperProperties",
- "spriteSheet": true,
- "action": "EyedropperTool",
- "toolTip": "Eyedropper Tool (I)",
- "cursor": "url('images/tools/eyedropper_down.png') 6 20, default",
- "lastInGroup": false,
- "container": false,
- "selected": false
- },
// {
// "id": "EraserTool",
// "properties": "eraserProperties",
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index f8934669..c647107f 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -179,13 +179,6 @@ exports.KeyboardMediator = Montage.create(Component, {
return;
}
- // Shortcut for Eyedropper Tool is I
- if(evt.keyCode === Keyboard.I && !(evt.ctrlKey || evt.metaKey)) {
- evt.preventDefault();
- this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[12]});
- return;
- }
-
// Rotate Stage Tool is M
if(evt.keyCode === Keyboard.M ) {
evt.preventDefault();
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
index 64cdc360..7a28c55d 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
@@ -128,7 +128,6 @@ exports.ColorPanelBase = Montage.create(Component, {
enumerable: true,
value: function (e) {
//
- this.application.ninja.colorController.createToolbar();
this.applyDefaultColors();
this.removeEventListener('firstDraw', this, false);
diff --git a/js/tools/PencilTool.js b/js/tools/PencilTool.js
deleted file mode 100755
index 349eb1e8..00000000
--- a/js/tools/PencilTool.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-This file contains proprietary software owned by Motorola Mobility, Inc.
-No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
-(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
- */
-
-var Montage = require("montage/core/core").Montage,
- DrawingTool = require("js/tools/drawing-tool").DrawingTool;
-
-exports.PencilTool = Montage.create(DrawingTool, {
- drawingFeedback: { value: { mode: "Draw2D", type: "" } },
-
- HandleLeftButtonDown: {
- value: function(event) {
- NJevent("enableStageMove");
-
- }
- },
-
- HandleMouseMove: {
- value: function(event) {
- this.doDraw(event);
- }
- },
-
- HandleLeftButtonUp: {
- value: function(event) {
- this.endDraw(event);
- NJevent("disableStageMove");
- }
- }
-});
\ No newline at end of file
diff --git a/scss/imports/scss/_toolbar.scss b/scss/imports/scss/_toolbar.scss
index 9bf540cd..f47d0664 100755
--- a/scss/imports/scss/_toolbar.scss
+++ b/scss/imports/scss/_toolbar.scss
@@ -112,10 +112,6 @@
background-image:url("../images/tools/Tool-Fill.png");
}
-.EyedropperTool {
- background-image:url("../images/tools/Tool-EyeDropper.png");
-}
-
.EraserTool {
background-image:url("../images/tools/Tool-Erase.png");
}
@@ -140,52 +136,6 @@
background-image:url("../images/tools/Tool-FillColor.png");
}
-.toolsList .colortoolbar {
- padding-left: 1px;
- padding-top:4px;
-}
-
-.toolsList .colortoolbar button
-{
- width: 27px;
- height: 27px;
- background: black;
- border: 1px solid #000;
- padding: 0;
- margin: 0px;
-}
-
-.toolsList .colortoolbar div
-{
- width: 27px;
- height: 27px;
- margin: 0;
- margin-top:3px;
-}
-
-.toolsList .colortoolbar div.cpe_colortoolbar_container
-{
- margin: 0;
-}
-
-
-
-/*.InkBottleToolPressed {*/
- /*background-image: url("../images/tools/inkbottle_down.png");*/
- /*background-repeat: no-repeat;*/
- /*height: 23px;*/
- /*width: 26px;*/
- /*opacity: 1;*/
-/*}*/
-
-/*.InkBottleToolUnpressed {*/
- /*background-image: url("../images/tools/inkbottle_down.png");*/
- /*background-repeat: no-repeat;*/
- /*height: 23px;*/
- /*width: 26px;*/
- /*opacity: 0.7;*/
-/*}*/
-
// Selection Tool Options
.topAlignUp {
@@ -251,6 +201,3 @@
@include background-pos(11,0,26px,23px);
}
-.pencilToolUp {
- @include background-pos(9,1,26px,23px);
-}
--
cgit v1.2.3