We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6cb8b9 commit 052e72bCopy full SHA for 052e72b
app/directives/master.js
@@ -146,6 +146,14 @@
146
element.off( "mousemove.bnMaster" );
147
element.off( "mouseup.bnMaster" );
148
149
+ // Check to see if the elements have moved at all. If they have not, then there
150
+ // is nothing more that the master needs to do.
151
+ if ( ! hasMoved( event.pageX, event.pageY ) ) {
152
+
153
+ return;
154
155
+ }
156
157
// Tell all the slaves to finalize positions.
158
$scope.$apply(
159
function() {
@@ -161,6 +169,17 @@
161
169
}
162
170
163
171
172
+ // I determine if the given coorindates indicate movement from the original position.
173
+ function hasMoved( pageX, pageY ) {
174
175
+ return(
176
+ ( pageX !== initialPageX ) ||
177
+ ( pageY !== initialPageY )
178
+ );
179
180
181
182
164
183
// -- Define Link Variables. ---------------- //
165
184
166
185
0 commit comments