aboutsummaryrefslogtreecommitdiff
path: root/js/panels/resize-composer.js
diff options
context:
space:
mode:
authorhwc4872012-04-05 17:09:51 -0700
committerhwc4872012-04-05 17:09:51 -0700
commit2d21b01d6dd64af643f5f38818b57fcace05ea0b (patch)
tree44fac83294dae2efad48389ddb44cb1dbe06caad /js/panels/resize-composer.js
parent7656b6eac7aec59697c6cddbe2a507fe9e4aa187 (diff)
parent96bfeee2e6b735b87e8482d6e2cf24d5224c6417 (diff)
downloadninja-2d21b01d6dd64af643f5f38818b57fcace05ea0b.tar.gz
Merge branch 'Snapping' of github.com:ericmueller/ninja-internal into Snapping_II
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