aboutsummaryrefslogtreecommitdiff
path: root/js/panels/resize-composer.js
diff options
context:
space:
mode:
authorhwc4872012-04-19 13:01:43 -0700
committerhwc4872012-04-19 13:01:43 -0700
commite6a20fe64574763483dc602bd759278ccf5e5e68 (patch)
tree69defe7200206f0257fe90697136fadef59d521e /js/panels/resize-composer.js
parentae7eb87564632ce7c676bd728b8ff2710ff0bb83 (diff)
parent9284c19f076dec3b47ece7dc7bcd22d74e4246c3 (diff)
downloadninja-e6a20fe64574763483dc602bd759278ccf5e5e68.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts: js/lib/drawing/world.js js/lib/geom/geom-obj.js js/lib/rdge/materials/cloud-material.js js/lib/rdge/materials/deform-material.js js/lib/rdge/materials/flat-material.js js/lib/rdge/materials/material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/relief-tunnel-material.js js/lib/rdge/materials/square-tunnel-material.js js/lib/rdge/materials/star-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/tunnel-material.js js/lib/rdge/materials/twist-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/uber-material.js js/lib/rdge/materials/water-material.js js/lib/rdge/materials/z-invert-material.js
Diffstat (limited to 'js/panels/resize-composer.js')
-rw-r--r--js/panels/resize-composer.js34
1 files changed, 27 insertions, 7 deletions
diff --git a/js/panels/resize-composer.js b/js/panels/resize-composer.js
index 6e5e89f8..0d1774cd 100644
--- a/js/panels/resize-composer.js
+++ b/js/panels/resize-composer.js
@@ -9,6 +9,14 @@ var Composer = require("montage/ui/composer/composer").Composer;
9 9
10exports.ResizeComposer = Montage.create(Composer, { 10exports.ResizeComposer = Montage.create(Composer, {
11 11
12 xAxis: {
13 value: true
14 },
15
16 yAxis: {
17 value: true
18 },
19
12 enabled : { 20 enabled : {
13 enumerable: false, 21 enumerable: false,
14 value: true 22 value: true
@@ -69,6 +77,7 @@ exports.ResizeComposer = Montage.create(Composer, {
69 load: { 77 load: {
70 value: function() { 78 value: function() {
71 this.element.addEventListener("mousedown", this, true); 79 this.element.addEventListener("mousedown", this, true);
80 this.element.addEventListener("dblclick", this, true);
72 } 81 }
73 }, 82 },
74 83
@@ -104,18 +113,29 @@ exports.ResizeComposer = Montage.create(Composer, {
104 113
105 captureMousemove: { 114 captureMousemove: {
106 value: function(e) { 115 value: function(e) {
107 this._deltaX = e.clientX - this._startX; 116 if (this.xAxis) {
108 this._deltaY = e.clientY - this._startY; 117 this._deltaX = e.clientX - this._startX;
118 }
119 else {
120 this._deltaX = 0;
121 }
122 if (this.yAxis) {
123 this._deltaY = e.clientY - this._startY;
124 }
125 else {
126 this._deltaY = 0;
127 }
109 this._executeEvent("resizeMove"); 128 this._executeEvent("resizeMove");
110 } 129 }
111 }, 130 },
112 131
113 deserializedFromTemplate: { 132 captureDblclick: {
114 value: function() { 133 value:function(e) {
115 if (this.component) { 134 this._reset();
116 this.component.addComposer(this); 135 this._executeEvent("resizeReset");
117 }
118 } 136 }
119 } 137 }
120 138
139
140
121}); \ No newline at end of file 141}); \ No newline at end of file