From 9539e778dd678cec90cf83528df69a189be3a192 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 15 May 2012 15:24:13 -0700 Subject: updated object 3D options bar to use the new radio styles removed its use of the sprite sheet --- css/ninja.css | 18 +-------- images/optionsbar/options3D/rotate-globally.png | Bin 0 -> 753 bytes images/optionsbar/options3D/rotate-locally.png | Bin 0 -> 626 bytes images/tools/sprite-toolbar-3d.png | Bin 2599 -> 0 bytes .../object3d-properties.html | 4 +- .../object3d-properties.js | 18 +++++---- scss/imports/scss/_Tools.scss | 42 +-------------------- 7 files changed, 17 insertions(+), 65 deletions(-) create mode 100644 images/optionsbar/options3D/rotate-globally.png create mode 100644 images/optionsbar/options3D/rotate-locally.png delete mode 100755 images/tools/sprite-toolbar-3d.png diff --git a/css/ninja.css b/css/ninja.css index 33ec332c..682dfc9d 100755 --- a/css/ninja.css +++ b/css/ninja.css @@ -769,23 +769,9 @@ input[type="radio"]:disabled { opacity: .3; background: #282828; border-width: 1 #zoomToolOptionHolder .zoomInToolIcon { background-image: url("../images/optionsbar/zoom/zoom_plus.png"); } -.object3DToolContainer input.tag-type { background: none; width: 20px; height: 20px; display: block; float: left; margin: 0px; margin-right: 5px; background-repeat: no-repeat; opacity: 0.8; text-indent: -9999px; cursor: pointer; -webkit-border-radius: 3px; -webkit-user-select: none; border: 1px solid transparent; } +.object3DToolContainer input.rotateLocally { background-image: url("../images/optionsbar/options3D/rotate-locally.png"); } -.object3DToolContainer input.tag-type { background-image: url("../images/tools/sprite-toolbar-3d.png"); } - -.object3DToolContainer input.tag-type:active { border: 1px solid transparent; } - -.object3DToolContainer input.tag-type:hover { opacity: 1.0; -webkit-box-shadow: 0px 0px 4px #fff; } - -.object3DToolContainer input.tag-type:checked { background-color: transparent; opacity: 1.0; cursor: default; -webkit-box-shadow: none; } - -.object3DToolContainer input.rotateLocally { background-position: -20px 0px; } - -.object3DToolContainer input.rotateLocally:checked { background-position: -20px -20px; } - -.object3DToolContainer input.rotateGlobally { background-position: 0px 0px; } - -.object3DToolContainer input.rotateGlobally:checked { background-position: 0px -20px; } +.object3DToolContainer input.rotateGlobally { background-image: url("../images/optionsbar/options3D/rotate-globally.png"); } .optionsSelectionTool button { padding-top: 0px; } diff --git a/images/optionsbar/options3D/rotate-globally.png b/images/optionsbar/options3D/rotate-globally.png new file mode 100644 index 00000000..64c144b4 Binary files /dev/null and b/images/optionsbar/options3D/rotate-globally.png differ diff --git a/images/optionsbar/options3D/rotate-locally.png b/images/optionsbar/options3D/rotate-locally.png new file mode 100644 index 00000000..b0950675 Binary files /dev/null and b/images/optionsbar/options3D/rotate-locally.png differ diff --git a/images/tools/sprite-toolbar-3d.png b/images/tools/sprite-toolbar-3d.png deleted file mode 100755 index d4746064..00000000 Binary files a/images/tools/sprite-toolbar-3d.png and /dev/null differ diff --git a/js/components/tools-properties/object3d-properties.reel/object3d-properties.html b/js/components/tools-properties/object3d-properties.reel/object3d-properties.html index 17bafacd..70ed79f9 100755 --- a/js/components/tools-properties/object3d-properties.reel/object3d-properties.html +++ b/js/components/tools-properties/object3d-properties.reel/object3d-properties.html @@ -31,8 +31,8 @@
- - + +
diff --git a/js/components/tools-properties/object3d-properties.reel/object3d-properties.js b/js/components/tools-properties/object3d-properties.reel/object3d-properties.js index afcb2400..d7f0976c 100755 --- a/js/components/tools-properties/object3d-properties.reel/object3d-properties.js +++ b/js/components/tools-properties/object3d-properties.reel/object3d-properties.js @@ -14,17 +14,21 @@ exports.Object3DProperties = Montage.create(ToolProperties, { rotateGlobally: { value: null, enumerable: false }, _subPrepare: { - value: function() { + value: function () { this.rotateLocally.addEventListener("click", this, false); this.rotateGlobally.addEventListener("click", this, false); } }, handleClick: { - value: function(event) { - this.selectedMode = event._event.target.id; - - NJevent("toolOptionsChange", {source: "Object3DProperties", mode: (this.selectedMode === "rotateLocally")}); + value: function (event) { + if (event._event.target === this.rotateLocally) { + this.selectedMode = "rotateLocally"; + } else { + this.selectedMode = "rotateGlobally"; + } + + NJevent("toolOptionsChange", { source: "Object3DProperties", mode: (this.selectedMode === "rotateLocally") }); } }, @@ -33,8 +37,8 @@ exports.Object3DProperties = Montage.create(ToolProperties, { }, selectedMode: { - get: function() { return this._selectedMode;}, - set: function(value) { this._selectedMode = value; } + get: function () { return this._selectedMode; }, + set: function (value) { this._selectedMode = value; } } diff --git a/scss/imports/scss/_Tools.scss b/scss/imports/scss/_Tools.scss index d068fd2e..c63e695d 100755 --- a/scss/imports/scss/_Tools.scss +++ b/scss/imports/scss/_Tools.scss @@ -337,49 +337,11 @@ input[type="radio"]:disabled { } // object 3D container styles -.object3DToolContainer input.tag-type { - background: none; - width: 20px; - height: 20px; - display: block; - float: left; - margin: 0px; - margin-right: 5px; - background-repeat: no-repeat; - opacity: 0.8; - text-indent: -9999px; - cursor: pointer; - -webkit-border-radius: 3px; - -webkit-user-select: none; - border: 1px solid transparent; -} -.object3DToolContainer input.tag-type { - background-image: url("../images/tools/sprite-toolbar-3d.png"); -} -.object3DToolContainer input.tag-type:active { - border: 1px solid transparent; -} -.object3DToolContainer input.tag-type:hover { - opacity: 1.0; - -webkit-box-shadow: 0px 0px 4px #fff; -} -.object3DToolContainer input.tag-type:checked { - background-color: transparent; - opacity: 1.0; - cursor: default; - -webkit-box-shadow: none; -} .object3DToolContainer input.rotateLocally { - background-position: -20px 0px; -} -.object3DToolContainer input.rotateLocally:checked { - background-position: -20px -20px; + background-image: url("../images/optionsbar/options3D/rotate-locally.png"); } .object3DToolContainer input.rotateGlobally { - background-position: 0px 0px; -} -.object3DToolContainer input.rotateGlobally:checked { - background-position: 0px -20px; + background-image: url("../images/optionsbar/options3D/rotate-globally.png"); } // Selection Tool Options Styles -- cgit v1.2.3