aboutsummaryrefslogtreecommitdiff
path: root/js/panels/resize-composer.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-04 10:39:32 -0700
committerNivesh Rajbhandari2012-04-04 10:39:32 -0700
commitb9032fb0f656a6c029ef0c71c490bb5d5cd10d94 (patch)
tree0faee331bf5d28877bdafd46ea26a269abaa91b2 /js/panels/resize-composer.js
parentdf0389e6a191ebbff4e4b5d6625007873c0737bd (diff)
parentdc9650af5760b1f93d6e93a383eabceacfdc0ad8 (diff)
downloadninja-b9032fb0f656a6c029ef0c71c490bb5d5cd10d94.tar.gz
Merge branch 'refs/heads/EricSnapping' into WebGLFileIO
Diffstat (limited to 'js/panels/resize-composer.js')
-rw-r--r--js/panels/resize-composer.js34
1 files changed, 7 insertions, 27 deletions
diff --git a/js/panels/resize-composer.js b/js/panels/resize-composer.js
index 0d1774cd..6e5e89f8 100644
--- a/js/panels/resize-composer.js
+++ b/js/panels/resize-composer.js
@@ -9,14 +9,6 @@ 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
20 enabled : { 12 enabled : {
21 enumerable: false, 13 enumerable: false,
22 value: true 14 value: true
@@ -77,7 +69,6 @@ exports.ResizeComposer = Montage.create(Composer, {
77 load: { 69 load: {
78 value: function() { 70 value: function() {
79 this.element.addEventListener("mousedown", this, true); 71 this.element.addEventListener("mousedown", this, true);
80 this.element.addEventListener("dblclick", this, true);
81 } 72 }
82 }, 73 },
83 74
@@ -113,29 +104,18 @@ exports.ResizeComposer = Montage.create(Composer, {
113 104
114 captureMousemove: { 105 captureMousemove: {
115 value: function(e) { 106 value: function(e) {
116 if (this.xAxis) { 107 this._deltaX = e.clientX - this._startX;
117 this._deltaX = e.clientX - this._startX; 108 this._deltaY = e.clientY - this._startY;
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 }
128 this._executeEvent("resizeMove"); 109 this._executeEvent("resizeMove");
129 } 110 }
130 }, 111 },
131 112
132 captureDblclick: { 113 deserializedFromTemplate: {
133 value:function(e) { 114 value: function() {
134 this._reset(); 115 if (this.component) {
135 this._executeEvent("resizeReset"); 116 this.component.addComposer(this);
117 }
136 } 118 }
137 } 119 }
138 120
139
140
141}); \ No newline at end of file 121}); \ No newline at end of file